view move-if-change @ 2159:3ceb3622efa3

[xemacs-hg @ 2004-07-01 14:44:43 by james] Make sure spec-lists and inst-lists are valid lists.
author james
date Thu, 01 Jul 2004 14:44:48 +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