view move-if-change @ 3521:c11067d70e63

[xemacs-hg @ 2006-07-19 19:38:39 by crestani] 2006-07-18 Marcus Crestani <crestani@xemacs.org> * .cvsignore: Add .dbxrc.in and .gdbinit.in.
author crestani
date Wed, 19 Jul 2006 19:38:40 +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