view move-if-change @ 104808:90ec0abf1017

* net/tramp-compat.el (top): Autoload used functions from tramp.el. (file-remote-p, process-file, start-file-process, set-file-times) (tramp-compat-file-attributes): Compatibility functions shall not call directly `tramp-handle-*', because this would bypass the locking mechanism. (tramp-compat-number-sequence): New defun.
author Michael Albinus <michael.albinus@gmx.de>
date Wed, 02 Sep 2009 11:15:36 +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