view move-if-change @ 1700:0a85daf64258

[xemacs-hg @ 2003-09-19 17:07:05 by youngs] 2002-09-20 James LewisMoss <dres@lewismoss.org> * gnuserv.el (gnuserv-edit-files): fallback to gtk if x device fails. Fixes problem where gnuclient fails for gtk instances when gnuclient was built with X configure.
author youngs
date Fri, 19 Sep 2003 17:07:07 +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