view move-if-change @ 1955:02446ca6a05d

[xemacs-hg @ 2004-03-18 09:57:08 by stephent] shut up Norbert's compiler <87y8pyv5rz.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Thu, 18 Mar 2004 09:57:12 +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