view move-if-change @ 57439:e12200cc9b00

(kmacro-insert-counter, kmacro-add-counter): Use and reset kmacro-initial-counter-value if set. (kmacro-set-counter): Only set kmacro-counter if defining or executing macro. Set kmacro-initial-counter-value otherwise. Never set both. (kmacro-display): Show macro counter if non-zero.
author Kim F. Storm <storm@cua.dk>
date Mon, 11 Oct 2004 22:13:20 +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