view move-if-change @ 2566:045f20e1c3af

[xemacs-hg @ 2005-02-04 04:06:23 by james] Thanks to David Evers, the dreaded email truncation bug should now be gone. See the xemacs-patches message with ID <ps3bwdnf8i.fsf@diannao.ittc.ku.edu>.
author james
date Fri, 04 Feb 2005 04:06:34 +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