view move-if-change @ 929:0c272be3414c

[xemacs-hg @ 2002-07-21 04:51:07 by youngs] 2002-07-21 Steve Youngs <youngs@xemacs.org> * package-index.LATEST.pgp: Update. * package-index.LATEST.gpg: Ditto.
author youngs
date Sun, 21 Jul 2002 04:51: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