view move-if-change @ 604:fa3b8eb89cb2

[xemacs-hg @ 2001-06-02 05:40:49 by ben] event-msw.c: conditionalize the messages that were causing compile errors. (if only macros could generate #ifdef statements ...)
author ben
date Sat, 02 Jun 2001 05:40:53 +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