view move-if-change @ 104057:00b7bce74d52

(Config Basics, File Styles): Document that at mode initialization, any individual variable setting now takes precedence over one done via c-file-style/c-file-offsets.
author Alan Mackenzie <acm@muc.de>
date Fri, 24 Jul 2009 12:14:02 +0000
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