view move-if-change @ 954:cb345077c98c

[xemacs-hg @ 2002-08-05 16:34:07 by james] Include signal.h early to define NSIG before config.h is included.
author james
date Mon, 05 Aug 2002 16:34:07 +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