view move-if-change @ 2595:ae5285944c74

[xemacs-hg @ 2005-02-18 21:56:10 by james] Fix for #ifdef inside of a macro use, as reported by Ben Wing. See xemacs-patches message with ID <pssm3tjzzh.fsf@diannao.ittc.ku.edu>.
author james
date Fri, 18 Feb 2005 21:56:11 +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