view move-if-change @ 2114:2e4be8dd02fc

[xemacs-hg @ 2004-06-06 12:35:44 by malcolmp] extw-Xt.c (_XT_WAIT_FOR_SOMETHING): Fix: complete macro renaming: #define.
author malcolmp
date Sun, 06 Jun 2004 12:35:45 +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