view move-if-change @ 100787:a001ee185900

(tar-data-swapped): New var. (tar-data-swapped-p, tar-swap-data): Use it instead of buffer-swapped-with. (tar-write-region-annotate): Re-add (partial undo of last change). (tar-mode): Use it again (partial undo as well).
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 30 Dec 2008 21:59:52 +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