but rather copy the files to mktemp generated & guaranteed unique files
(don't worry, this is the last patch for today :-)
# create temporary dir that's automatcally removed on exit
-TMP=$(mktemp -d /tmp/$SELF.$AIRCRAFT.XXXXXX) || (echo "$0: can't create temporary dir"; exit 1)
+TMP=$(mktemp -d -t $SELF.$AIRCRAFT.XXX) || (echo "$0: can't create temporary dir"; exit 1)
trap "rm -rf $TMP" 0 1 2 3 13 15
# move older archive or diff file out of the way
-[ -f $DIFF ] && mv -i $DIFF $DIFF~
-[ -f $ARCHIVE ] && mv -i $ARCHIVE $ARCHIVE~
+[ -f $DIFF ] && mv $DIFF $(mktemp $DIFF.X)
+[ -f $ARCHIVE ] && mv $ARCHIVE $(mktemp $ARCHIVE.X)
LOG "updating and checking for changed and new files ..."