view move-if-change @ 4774:26a007fa2f4c

Add GPL v2 or later notice to lib-src/ad2c with George Ferguson's permission. See xemacs-patches message with ID <870180fe0912151244y5bb656b0g8f28cf7c34e66420@mail.gmail.com>.
author Jerry James <james@xemacs.org>
date Tue, 15 Dec 2009 13:45:48 -0700
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