view move-if-change @ 82942:5cf3cd03cb50

* net/tramp.el (tramp-handle-set-file-times): Flush the file properties. (tramp-set-file-uid-gid, tramp-get-local-uid) (tramp-get-local-gid): New defuns. (tramp-handle-copy-file): Handle new parameter PRESERVE-UID-GID. (tramp-do-copy-or-rename-file): New parameter PRESERVE-UID-GID. Improve fast track. (tramp-do-copy-or-rename-file-directly): Sync parameter list with the other tramp-do-copy-or-rename-file-* functions. Major rewrite. (tramp-handle-file-local-copy, tramp-handle-insert-file-contents) (tramp-handle-write-region): Improve fast track. (tramp-handle-file-remote-p): IDENTIFICATION can also be 'localname. (tramp-maybe-open-connection): Let `process-adaptive-read-buffering' be nil.
author Michael Albinus <michael.albinus@gmx.de>
date Tue, 28 Aug 2007 20:09:58 +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