view move-if-change @ 109443:9e514d1076b4

* net/tramp.el (tramp-handle-shell-command): Don't use hard-wired "/bin/sh" but `tramp-remote-sh' from `tramp-methods'. (tramp-find-shell): Simplify setting connection property. (tramp-get-ls-command): Make test for "--color=never" stronger.
author Michael Albinus <michael.albinus@gmx.de>
date Fri, 16 Jul 2010 14:09:55 +0200
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