view move-if-change @ 626:04513e008e7f

[xemacs-hg @ 2001-07-02 21:00:02 by adrian] [PATCH] Update of FAQ Q1.0.14, recommended for 21.1 and 21.4 as well <1ynzhwt3.fsf@ecf.teradyne.com>
author adrian
date Mon, 02 Jul 2001 21:00:03 +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