view move-if-change @ 3915:b974237c21a8

[xemacs-hg @ 2007-04-21 14:18:54 by adrian] A few typo fixes, mostly to people's names. I have not fixed the typos in the locations these excerpts come from (ChangeLog files, etc.).
author adrian
date Sat, 21 Apr 2007 14:18:54 +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