view move-if-change @ 1037:3a01f3148bff

[xemacs-hg @ 2002-10-08 03:24:18 by youngs] 2002-09-03 John Paul Wallington <jpw@shootybangbang.com> * subr.el (with-output-to-string): Synch with GNU Emacs 21; avoids leaking temp buffers by killing rather than erasing them, and doesn't execute BODY in temporary `standard-output' buffer.
author youngs
date Tue, 08 Oct 2002 03:24:22 +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