From 9a1d1e389ae924d76a4b69518647857c0eafd068 Mon Sep 17 00:00:00 2001 From: mfranz Date: Tue, 6 Mar 2007 21:48:28 +0000 Subject: [PATCH] don't move existing diff/tar.bz2 file away asking if it's ok to overwrite, but rather copy the files to mktemp generated & guaranteed unique files (don't worry, this is the last patch for today :-) --- scripts/tools/fg-submit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/tools/fg-submit b/scripts/tools/fg-submit index c9b9e7e59..f113f6b6d 100755 --- a/scripts/tools/fg-submit +++ b/scripts/tools/fg-submit @@ -61,13 +61,13 @@ function diffstat { # 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 ..."