From: Timo Kokkonen Date: Tue, 1 Nov 2016 18:54:49 +0000 (+0200) Subject: mkcompile_h: Use mv instead of cp X-Git-Url: http://git.itanic.dy.fi/?p=rrdd;a=commitdiff_plain;h=a20494b26ff20cbbe4d841f80ca8d89b9c6c3b7f mkcompile_h: Use mv instead of cp 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 --- diff --git a/mkcompile_h b/mkcompile_h index c142459..1a996bd 100755 --- a/mkcompile_h +++ b/mkcompile_h @@ -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 - 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 || \ - cp $COMPILER_STR_TMP $COMPILER_STR_TARGET + mv $COMPILER_STR_TMP $COMPILER_STR_TARGET else - cp $COMPILER_STR_TMP $COMPILER_STR_TARGET + mv $COMPILER_STR_TMP $COMPILER_STR_TARGET fi