]> andersk Git - moira.git/commitdiff
Transfer file to a temporary filename and mv it into place if transfer
authorzacheiss <zacheiss>
Tue, 3 Apr 2007 15:36:01 +0000 (15:36 +0000)
committerzacheiss <zacheiss>
Tue, 3 Apr 2007 15:36:01 +0000 (15:36 +0000)
was successful.

gen/sapprint.sh

index a32d6da8ced32122c72dacc94da485b397aeb974..6fdf353b6aac43dccbdd3d737f0da35530c7e054 100755 (executable)
@@ -12,7 +12,8 @@ fi
 MR_MISSINGFILE=47836473
 
 PATH=/bin
-OUTFILE=/var/tmp/sapprint.out
+OUTFILE=/var/tmp/sapprint.out.moira
+DSTFILE=/var/tmp/sapprint.out
 
 # Alert if the output file doesn't exist
 test -r $OUTFILE || exit $MR_MISSINGFILE
@@ -22,6 +23,9 @@ chown root $OUTFILE
 chgrp 0 $OUTFILE
 chmod 644 $OUTFILE
 
+# mv file into place.
+mv $OUTFILE $DSTFILE
+
 # cleanup
 test -f $0 && rm -f $0
 
This page took 0.044508 seconds and 5 git commands to generate.