aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bulkrename.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/bulkrename.sh b/scripts/bulkrename.sh
index 9df17d2..186326a 100755
--- a/scripts/bulkrename.sh
+++ b/scripts/bulkrename.sh
@@ -5,9 +5,7 @@
EDITOR=${EDITOR=:vi}
-while [ -z "$TMPFILE" -o -e "$TMPFILE" ]; do
- TMPFILE="/tmp/bulkrename.$RANDOM"
-done
+TMPFILE="$(mktemp)"
touch "$TMPFILE"
FILES=( )
@@ -31,7 +29,7 @@ while read line; do
if [ -e "${FILES[$i]}" -a ! -e "$line" ]; then
mv "${FILES[$i]}" "$line"
else
- echo Error. does target already exist?
+ echo "Skipping ${FILES[$i]} -> $line . Target already exists."
fi
fi