view move-if-change @ 2516:b87570db038f

[xemacs-hg @ 2005-01-26 10:25:03 by ben] Rest of hash-table cleanup (Part 2 of 2) lisp.h: Clean up and generalize creation of string hash tables. Use Hashcode rather than unsigned long.
author ben
date Wed, 26 Jan 2005 10:25:05 +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