view move-if-change @ 4203:0a63e5de7bdc

[xemacs-hg @ 2007-10-02 19:31:30 by aidan] Synch up format-time-string % specifiers with Emacs 21.3.1, from Shyamal Prasad.
author aidan
date Tue, 02 Oct 2007 19:31:31 +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