view move-if-change @ 1922:569139be45f6

[xemacs-hg @ 2004-02-21 07:53:59 by stephent] reorder XE_CFLAGS computation <87r7wona1o.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Sat, 21 Feb 2004 07:54:01 +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