view move-if-change @ 515:768853052061

[xemacs-hg @ 2001-05-07 14:16:55 by yoshiki] Jason's patch "[21.1, 21.2] etc/FTP: mirror site updates", <puiae87qpqx.fsf@cyan.acl.lanl.gov>
author yoshiki
date Mon, 07 May 2001 14:17:28 +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