view move-if-change @ 932:5c7570514cc5

[xemacs-hg @ 2002-07-25 00:23:45 by youngs] 2002-07-25 Steve Youngs <youngs@xemacs.org> * process-unix.c (child_setup): (unix_create_process): Revert Mike's patch of 2002-07-20.
author youngs
date Thu, 25 Jul 2002 00:23:46 +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