view move-if-change @ 3125:d97bc868eaaf

[xemacs-hg @ 2005-12-05 09:43:36 by scop] Look for rgb.txt from /usr(/local)/share/X11 <1133641210.2195.86.camel@localhost.localdomain>
author scop
date Mon, 05 Dec 2005 09:43:37 +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