view move-if-change @ 981:0205cafe98ff

[xemacs-hg @ 2002-08-30 08:25:48 by youngs] Don't look now, but 21.5.9 is on its way out the door! Don't forget what good 'ol Ma used to say... "Eat your brussels sprouts, little Johnny, so you can grow up big and strong."
author youngs
date Fri, 30 Aug 2002 08:26:22 +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