view move-if-change @ 4124:9a633a00c3f2

[xemacs-hg @ 2007-08-17 08:08:05 by crestani] 2007-08-15 Marcus Crestani <crestani@xemacs.org> * database.c (dbm_map): Add typecast. * database.c (dbm_get): Add typecast. * gc.c (gc_state_type): Declare type. * objects-tty.c (tty_find_charset_font): Add typecast. * objects-xlike-inc.c (count_hyphens): Add typecast. * objects-xlike-inc.c (endif): Add typecast.
author crestani
date Fri, 17 Aug 2007 08:08:10 +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