view move-if-change @ 4256:1dabc28c10d0

[xemacs-hg @ 2007-11-08 07:12:39 by michaels] 2007-10-31 Mike Sperber <mike@xemacs.org> * autoload.el (make-autoload): Add `defclass' and `defmethod' as defmacro-like operators. This is need to enable compilation of packages that depend on eieio.
author michaels
date Thu, 08 Nov 2007 07:12: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