view move-if-change @ 2509:6a9afa282c8e

[xemacs-hg @ 2005-01-26 09:53:28 by ben] fix warnings frame.el: Fix warning. cl.el: Conditionalize on coerce-number as Jerry says it's OK. fakemail.c: Add args to fix warning.
author ben
date Wed, 26 Jan 2005 09:53:32 +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