From: Fred Hamster Date: Wed, 15 Jan 2025 14:11:13 +0000 (-0500) Subject: updated a couple checks to accept empty dirs X-Git-Tag: 2.140.189^2~32 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=bbda5b6508ce36b7b4742ba295ed7074841af8d2;p=feisty_meow.git updated a couple checks to accept empty dirs --- diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index fa2d200c..faecce61 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -300,7 +300,7 @@ function show_active_branch() #hmmm: if no args, assume current dir!? for directory in "$@"; do - if [ $directory == "." ]; then + if [ -z "$directory" -o $directory == "." ]; then directory="$( \cd . && /bin/pwd )" #echo "calculated directory as '$directory'" fi @@ -416,7 +416,7 @@ function do_revctrl_simple_update() #hmmm: another piece of reusable code, to process the directory for printing. # make a nice echoer since we want to use it inside conditions below. local nicedir="$directory" - if [ $nicedir == "." ]; then + if [ -z "$nicedir" -o "$nicedir" == "." ]; then nicedir=$(\pwd) fi local blatt_report="echo -e \nretrieving '$nicedir'..."