minstall: Always remove destination file before (re-)creating it.

This avoids issues with overwriting files that are being used.
(cherry picked from d71a5647a3 commit)
This commit is contained in:
Michel Dänzer
2006-12-11 17:36:35 +01:00
committed by Zou Nan hai
parent aeda4c589a
commit bce82efe1f
+1
View File
@@ -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"`