From b8aa3c0b842a630c3ea0222a36471275351314a2 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Fri, 10 Nov 2017 14:39:26 -0500 Subject: [PATCH] now complains about attempts to do nothing --- scripts/rev_control/version_control.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index 4ea5ab53..2e221491 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -421,8 +421,16 @@ function perform_revctrl_action_on_file() save_terminal_title + local first_run=true + while read -u 3 dirname; do - if [ -z "$dirname" ]; then continue; fi + if [ -z "$dirname" ]; then + if [ ! -z "$first_run" ]; then + echo "There was nothing to do the action '$action' on." + fi + break + fi + unset first_run pushd "$dirname" &>/dev/null echo "[$(pwd)]" $action . -- 2.34.1