view move-if-change @ 3212:26a547441418

[xemacs-hg @ 2006-01-21 13:34:20 by crestani] Fixes for Cygwin 1.5.19: * sysdir.h: Workaround missing d_ino field from 'struct dirent'. * mc-alloc.c (init_mc_allocator): Cygwin claims to have a 64k page size, add it.
author crestani
date Sat, 21 Jan 2006 13:34:21 +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