view move-if-change @ 4927:5274591ce707

Add copyright and license information for Jonathan Harris's contributions. See <870180fe1002030842k3c2f851fpeea9f7a361768e01@mail.gmail.com> in xemacs-patches for more information.
author Jerry James <james@xemacs.org>
date Wed, 03 Feb 2010 09:43:16 -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