view move-if-change @ 1295:064ef1d07d63

[xemacs-hg @ 2003-02-14 07:54:27 by ben] no specifier crashes under Windows, please scrollbar.c: Don't generate fallbacks for TTY's when not HAVE_TTY.
author ben
date Fri, 14 Feb 2003 07:54:29 +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