aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVG <vg@devys.org>2016-01-25 20:44:01 +0100
committerVG <vg@devys.org>2016-01-25 20:44:01 +0100
commitbe3b62e47d6e89b5f5f17bba7d05a508d0f90bfa (patch)
treed00dfef3e13b3084636ce27423a5a69febbc8fc6
parent8059f16f57bc578ba7a04d12c89587a8eb96f63f (diff)
downloadbulkrename-be3b62e47d6e89b5f5f17bba7d05a508d0f90bfa.tar.gz
bulkrename-be3b62e47d6e89b5f5f17bba7d05a508d0f90bfa.tar.bz2
bulkrename-be3b62e47d6e89b5f5f17bba7d05a508d0f90bfa.zip
more progress and error indication (with cosmetic change)
-rwxr-xr-xbulkrename3
1 files changed, 2 insertions, 1 deletions
diff --git a/bulkrename b/bulkrename
index eebbb80..bb19f21 100755
--- a/bulkrename
+++ b/bulkrename
@@ -11,8 +11,8 @@ fi
EDITOR="${EDITOR:-vi}"
namebase="$(mktemp -d)/blkrn"
-exec </dev/tty >/dev/tty || { echo 'Interactive terminal needed' >&2; exit; }
tee -- "${namebase}.1" >> "${namebase}.2"
+exec </dev/tty >/dev/tty || { echo 'Interactive terminal needed' >&2 ; exit 1; }
"$EDITOR" "${namebase}.2"
@@ -35,6 +35,7 @@ done > "${namebase}.sh"
if [ "$(stat --printf="%s" "${namebase}.sh")" -ne 0 ] ; then
"$EDITOR" "${namebase}.sh"
sh -e -- "${namebase}.sh"
+ echo "bulkrename is done"
fi
rm -r "$(dirname "${namebase}")"