minstall: Always remove destination file before (re-)creating it.
authorMichel Dänzer <michel@tungstengraphics.com>
Mon, 11 Dec 2006 16:36:35 +0000 (17:36 +0100)
committerZou Nan hai <nanhai.zou@intel.com>
Wed, 13 Dec 2006 21:25:42 +0000 (13:25 -0800)
This avoids issues with overwriting files that are being used.
(cherry picked from d71a5647a3ed4aadd46edfa8a031ffc87d88c5f7 commit)

bin/minstall

index 9795263f9f17a07b29bc3f55a3f68987f648c2d6..210c2758d3700093e8fb52846eb9515ebd0efe9c 100755 (executable)
@@ -65,6 +65,7 @@ if [ $# -ge 2 ] ; then
 
                elif [ -f "$FILE" ] ; then
                        #echo "$FILE" is a regular file
+                       $RM "$DEST/$FILE"
                        cp "$FILE" "$DEST"
                        if [ $MODE ] ; then
                                FILE=`basename "$FILE"`