view move-if-change @ 991:a28c97bd4634

[xemacs-hg @ 2002-09-03 05:36:51 by scop] 2002-09-02 Ville Skyttä <ville.skytta@xemacs.org> * bytecomp-runtime.el (make-obsolete): Docstring argument nit. (make-obsolete-variable): Ditto. (make-compatible): Ditto. (make-compatible-variable): Ditto.
author scop
date Tue, 03 Sep 2002 05:36:52 +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