view move-if-change @ 53056:a9d324df91c7

(easy-mmode-define-navigation): Take additional optional arg NARROWFUN. For the generated functions: Add local var `was-narrowed-p'. Also, if NARROWFUN is specified, include frags that arrange to check for and save narrowing state before the move and then conditionally call NARROWFUN after the move.
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Fri, 14 Nov 2003 16:16:31 +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