view move-if-change @ 1009:c7a849296cb4

[xemacs-hg @ 2002-09-20 11:32:42 by stephent] AIX macro lossage <87wupg6gph.fsf_-_@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Fri, 20 Sep 2002 11:32:45 +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