view move-if-change @ 112268:4e6ae7191e28

* building.texi (Compilation): Improve instructions for running two compilations (Bug#7573).
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 14 Jan 2011 22:10:38 -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