view move-if-change @ 701:886e83363116

[xemacs-hg @ 2001-12-17 15:58:18 by adrian] [PATCH APPROVE RECOMMEND 21.4] .cvsignore generated info files [was: cvs updating] <heqrqc0k.fsf_-_@mailto.t-online.de>
author adrian
date Mon, 17 Dec 2001 15:58:18 +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