view move-if-change @ 568:430f8ca10ca6

[xemacs-hg @ 2001-05-24 12:12:03 by yoshiki] Norbert Koch's patch "Re: Notice of commit by yoshiki in XEmacs/xemacs/src", <vzu22bngmy.fsf@lamia.LF.net> * doprnt.c (emacs_doprnt_1): forgotten sons of Ben's error patch
author yoshiki
date Thu, 24 May 2001 12:12:16 +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