From a20494b26ff20cbbe4d841f80ca8d89b9c6c3b7f Mon Sep 17 00:00:00 2001 From: Timo Kokkonen Date: Tue, 1 Nov 2016 20:54:49 +0200 Subject: [PATCH] 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 --- mkcompile_h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.44.0