view move-if-change @ 997:89cca5f594bd

[xemacs-hg @ 2002-09-10 15:37:48 by james] Commit the stuff in the top-level directory that CVS didn't commit the first time around. This completes the module changes begun with the previous commit.
author james
date Tue, 10 Sep 2002 15:38:03 +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