view move-if-change @ 104807:509a5b989179

* net/tramp.el (tramp-handle-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat): Rename from `tramp-handle-file-attributes-with-*'. (tramp-handle-file-attributes): Use them. (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat): Rename from `tramp-handle-directory-files-and-attributes-with-*'. (tramp-handle-directory-files-and-attributes): Use them. (tramp-method-out-of-band-p): Additional parameter SIZE. (tramp-do-copy-or-rename-file, tramp-handle-file-local-copy) (tramp-handle-write-region): Use it. (tramp-handle-insert-directory): Use "?\ " for compatibility reasons. (tramp-handle-vc-registered): Check, whether the first run did return files to be tested. (tramp-advice-make-auto-save-file-name): Do not call directly `tramp-handle-make-auto-save-file-name', because this would bypass the locking mechanism.
author Michael Albinus <michael.albinus@gmx.de>
date Wed, 02 Sep 2009 11:13:42 +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