view move-if-change @ 87446:168445c0b213

* vc-hooks.el, vc.el: Move vc-directory-exclusion-list from vc.el to vc-hooks.el so it will be available to other modes, such as speedbar.el. Also, teach it to recognize monotine state directories. * speedbar.el: Remove this mode's fragile assumptions about version-control systems. Instead, make it use logic from vc-hooks.el so it will become smarter whenever VC mode does. * vc-hooks.el: 'added is a real state, not a future hypothetical one. Fix the documentation.
author Eric S. Raymond <esr@snark.thyrsus.com>
date Fri, 28 Dec 2007 13:29:41 +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