view move-if-change @ 107357:0f6a30c8d91a

Additional fix for rfc822-addresses (Bug#5692). * mail/rfc822.el (rfc822-addresses): Use nested catches to ensure that all errors are caught, and that the return value is always a list (Bug#5692).
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 08 Mar 2010 11:17:30 -0500
parents 354e0c45cedf
children 14a97ab281d5
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