From bbda5b6508ce36b7b4742ba295ed7074841af8d2 Mon Sep 17 00:00:00 2001 From: Fred Hamster Date: Wed, 15 Jan 2025 09:11:13 -0500 Subject: [PATCH] updated a couple checks to accept empty dirs --- scripts/rev_control/version_control.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'..." -- 2.34.1