view move-if-change @ 642:277f059a321b

[xemacs-hg @ 2001-08-01 18:59:04 by adrian] [PATCH] xemacs-21.5: Peter's patch refilled with verbatim ChangeLog <elqvbof1.fsf@ecf.teradyne.com>
author adrian
date Wed, 01 Aug 2001 18:59:04 +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