view move-if-change @ 94556:8d02ae7cb729

* vc.el (vc-dir-mode-map): Enable mouse bindings. (vc-at-event): New macro: run the body at the even location. (vc-dir-menu, vc-dir-toggle-mark): Use it. (vc-dir-mark-file, vc-dir-unmark-file): Move only on non-mouse events. * subr.d (mouse-event-p): Check if the even is mouse-related.
author Sam Steingold <sds@gnu.org>
date Fri, 02 May 2008 14:37:39 +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