view move-if-change @ 105448:b0226862b32c

* bookmark.el (bookmark-handle-bookmark): When relocating a bookmark, don't use a file dialog, because they usually don't know how to read a directory target from the user. (Bug#4230) Also, make sure the prompt can display directories as well as files.
author Karl Fogel <kfogel@red-bean.com>
date Mon, 05 Oct 2009 02:38:35 +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