view move-if-change @ 3104:63b684f8a823

[xemacs-hg @ 2005-11-28 16:39:53 by stephent] Add lrecord_uid_counter to xemacs.def.in.in. <87wtiswwwt.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Mon, 28 Nov 2005 16:39:54 +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