view move-if-change @ 696:5596b330879a

[xemacs-hg @ 2001-12-15 19:25:19 by adrian] [PATCH APPROVE COMMIT RECOMMEND 21.4] xemacs-21.5: man fixes for improved HTML online docs <3d2cqod9.fsf@mailto.t-online.de>
author adrian
date Sat, 15 Dec 2001 19:25:21 +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