view move-if-change @ 483:991f80dc633d

[xemacs-hg @ 2001-04-24 16:25:15 by hrvojen] Make sure the callbacks in about-finish-buffer work even if the event is nil. Published in <sxs1yqi467q.fsf@florida.arsdigita.de>.
author hrvojen
date Tue, 24 Apr 2001 16:25:18 +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