commit 709f3ed6fe04cf5c3f748dd59423aee93acfc569 parent eda3c159ea711a5a2d3ee9969de507fdc320c149 Author: Jake Bauer <jbauer@paritybit.ca> Date: Mon, 14 Feb 2022 02:43:58 -0500 Make sbs recurse on directories Diffstat:
M | sbs | | | 6 | ++++-- |
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sbs b/sbs @@ -31,8 +31,10 @@ for key in $options; do done for file in "$@"; do - if [ ! -f "$file" ]; then - printf "ERROR: %s not found or is not a file.\n" "$file" + if [ -d "$file" ]; then + "$0" "$file/*" + elif [ ! -f "$file" ]; then + printf "ERROR: %s does not exist.\n" "$file" continue fi