view move-if-change @ 683:eddbb88c3e02

[xemacs-hg @ 2001-12-02 22:06:19 by adrian] [PATCH APPROVE COMMIT] xemacs-21.5: Use exec-suffix-list with locate-file in lisp/package-get.el <8zcl46l9.fsf@mailto.t-online.de>
author adrian
date Sun, 02 Dec 2001 22:06:19 +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