view move-if-change @ 66325:fda96ff4c7e5

* files.el (directory-listing-before-filename-regexp): New defvar. Replaces `dired-move-to-filename-regexp' from dired.el. * dired.el (dired-move-to-filename-regexp): Removed. All occurences replaced by `directory-listing-before-filename-regexp'. * dired-x.el, locate.el, vc.el: Replace `dired-move-to-filename-regexp' by `directory-listing-before-filename-regexp'. In vc.el it is overwritten locally; maybe this can be handled in files.el too. * net/ange-ftp.el (ange-ftp-date-regexp): Removed. All occurences replaced by `directory-listing-before-filename-regexp'. * faq.texi (Bugs and problems): Replace `dired-move-to-filename-regexp' by `directory-listing-before-filename-regexp'.
author Michael Albinus <michael.albinus@gmx.de>
date Sun, 23 Oct 2005 12:17:28 +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