view move-if-change @ 5668:ee95ef1e644c

Update `file-name-remote-p'. 2008-01-03 Michael Sperber <mike@xemacs.org> * files.el (file-remote-p): Synch with GNU Emac: Add `identification' and `connected' parameters, and use file-name handler if available. Zap support for ange-ftp.
author Mike Sperber <sperber@deinprogramm.de>
date Mon, 02 Jul 2012 20:39:12 +0200
parents 376386a54a3c
children
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