view move-if-change @ 5390:593d9f73a7e8

New FAQ Q2.5.7 on troubleshooting duplicate auto-autoloads. Nodes Top, Installation, Q2.5.6: Update menus and node links for Q2.5.7.
author Stephen J. Turnbull <stephen@xemacs.org>
date Sat, 02 Apr 2011 17:04:38 +0900
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