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 :-)
This commit is contained in:
parent
d719f7ac63
commit
9a1d1e389a
1 changed files with 3 additions and 3 deletions
|
@ -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 ..."
|
||||
|
|
Loading…
Add table
Reference in a new issue