minstall: Don't copy over an identical file
The rationale here is to avoid updating a timestamp for a file that hasn't changed. Needless updates of the timestamp can ripple into other projects, (xserver, etc.), useless recompiling due to a 'make install' in mesa that didn't actually change anything.
This commit is contained in:
parent
042d9a5132
commit
d2f4c2b632
|
@ -66,8 +66,11 @@ if [ $# -ge 2 ] ; then
|
||||||
|
|
||||||
elif [ -f "$FILE" ] ; then
|
elif [ -f "$FILE" ] ; then
|
||||||
#echo "$FILE" is a regular file
|
#echo "$FILE" is a regular file
|
||||||
$RM "$DEST/`basename $FILE`"
|
# Only copy if the files differ
|
||||||
cp "$FILE" "$DEST"
|
if ! cmp -s $FILE $DEST/`basename $FILE`; then
|
||||||
|
$RM "$DEST/`basename $FILE`"
|
||||||
|
cp "$FILE" "$DEST"
|
||||||
|
fi
|
||||||
if [ $MODE ] ; then
|
if [ $MODE ] ; then
|
||||||
FILE=`basename "$FILE"`
|
FILE=`basename "$FILE"`
|
||||||
chmod $MODE "$DEST/$FILE"
|
chmod $MODE "$DEST/$FILE"
|
||||||
|
|
Loading…
Reference in New Issue