view move-if-change @ 494:4137b1fb7b90

[xemacs-hg @ 2001-05-01 07:23:47 by ben] * xemacs.mak (DEPEND): Don't add config.inc to the horked depend file. It's not recognized by nmake and just results in warnings. * xemacs.mak (docfile): Don't use $(DEL) in the middle of a shell command, because it will try to call `-del' and fail.
author ben
date Tue, 01 May 2001 07:23:47 +0000
parents 376386a54a3c
children
line wrap: on
line source

#!/bin/sh
if
test -r $2
then
if
cmp $1 $2 > /dev/null
then
echo $2 is unchanged
rm -f $1
else
mv -f $1 $2
fi
else
mv -f $1 $2
fi