view move-if-change @ 2830:d7505a1267a4

[xemacs-hg @ 2005-06-26 19:05:05 by aidan] Couple of build fixes--that'll teach me to spend the weekend doing something other than hacking XEmacs.
author aidan
date Sun, 26 Jun 2005 19:05: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