view move-if-change @ 105509:69bf209a4707

* net/tramp-smb.el (tramp-smb-errors): Add error messages. (tramp-smb-file-name-handler-alist): Add handler for `copy-directory', `expand-file-name', `set-file-modes'. (tramp-smb-handle-copy-directory) (tramp-smb-handle-expand-file-name) (tramp-smb-handle-set-file-modes): New defuns. (tramp-smb-handle-copy-file): Handle KEPP-DATE. (tramp-smb-handle-file-attributes): Simplify check for retrieving entry. (tramp-smb-handle-insert-directory): Don't flush the cache. (tramp-smb-maybe-open-connection): Check for samba client and server versions.
author Michael Albinus <michael.albinus@gmx.de>
date Wed, 07 Oct 2009 11:30:19 +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