view move-if-change @ 50926:dd6110a63907

New backend functions `delete-file' and `repository-hostname'. (vc-stay-local): New var. Mostly taken from vc-cvs-stay-local. (vc-stay-local-p): New fun. Adapted from vc-cvs-stay-local-p. (vc-diff-switches-list): Revert to the Emacs-21.[123] semantics. Mark as obsolete. (vc-delete-file): New command. (vc-default-rename-file): New function. (vc-rename-file): Use it. Be careful to disallow renaming if the file is locked or out-of-date. (vc-ensure-vc-buffer, vc-next-action-on-file, vc-insert-headers) (vc-cancel-version, vc-annotate): Use buffer-file-name variable.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 09 May 2003 16:33:10 +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