view move-if-change @ 1141:0dade3314f4f

[xemacs-hg @ 2002-12-04 13:54:31 by stephent] BerkDB 4 <871y4xnb90.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Wed, 04 Dec 2002 13:54: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