view move-if-change @ 78160:ba35decf8cc1

(bookmark-maybe-sort-alist): Don't modify bookmark-alist. Instead, if not sorting, simply return it. (bookmark-bmenu-list): Call bookmark-maybe-sort-alist for its return value, not for its side effect.
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Tue, 17 Jul 2007 16:12:51 +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