view move-if-change @ 3909:3d2a9b62e044

[xemacs-hg @ 2007-04-16 14:22:39 by stephent] oops ... this is the intended commit. <871wikv1c5.fsf@uwakimon.sk.tsukuba.ac.jp>
author stephent
date Mon, 16 Apr 2007 14:22:52 +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