]> git.itanic.dy.fi Git - rrdd/commitdiff
mkcompile_h: Use mv instead of cp
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Tue, 1 Nov 2016 18:54:49 +0000 (20:54 +0200)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Tue, 1 Nov 2016 18:54:49 +0000 (20:54 +0200)
Once temporary version files are done, replace the original with the
temp file instead of copying over it. We don't need the temporary copy
any more so we can move it over the target file.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
mkcompile_h

index c14245989c137d7e8bb9bf5e43aa5680e5ee76a7..1a996bdaef5a12fb95efac2cefcc8439a214543a 100755 (executable)
@@ -22,15 +22,15 @@ echo "#endif" >> $VERSION_TMP
 if [ -f $VERSION_TARGET ] ; then
        cmp -s $VERSION_TMP $VERSION_TARGET || cp $VERSION_TMP $VERSION_TARGET
 else
 if [ -f $VERSION_TARGET ] ; then
        cmp -s $VERSION_TMP $VERSION_TARGET || cp $VERSION_TMP $VERSION_TARGET
 else
-       cp $VERSION_TMP $VERSION_TARGET
+       mv $VERSION_TMP $VERSION_TARGET
 fi
 
 echo $COMPILER_STR > $COMPILER_STR_TMP
 
 if [ -f $COMPILER_STR_TARGET ] ; then
        cmp -s $COMPILER_STR_TMP $COMPILER_STR_TARGET || \
 fi
 
 echo $COMPILER_STR > $COMPILER_STR_TMP
 
 if [ -f $COMPILER_STR_TARGET ] ; then
        cmp -s $COMPILER_STR_TMP $COMPILER_STR_TARGET || \
-           cp $COMPILER_STR_TMP $COMPILER_STR_TARGET
+           mv $COMPILER_STR_TMP $COMPILER_STR_TARGET
 else
 else
-       cp $COMPILER_STR_TMP $COMPILER_STR_TARGET
+       mv $COMPILER_STR_TMP $COMPILER_STR_TARGET
 fi
 
 fi