view move-if-change @ 57653:b324ca4df07c

* simple.el (process-file): New function, similar to call-process but supports file handlers. * vc.el (vc-do-command): Use it, instead of call-process. * net/tramp-vc.el (vc-do-command): Do not advise it if process-file is fboundp. * net/tramp.el (tramp-file-name-handler-alist): Add entry for process-file. (tramp-handle-process-file): New function. (tramp-file-name-for-operation): Support process-file.
author Kai Großjohann <kgrossjo@eu.uu.net>
date Sat, 23 Oct 2004 19:52:18 +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