view move-if-change @ 66585:00e4363eadb1

Sync up to version 19. (savehist-mode): New minor mode. (savehist-file): Use ~/.emacs.d or ~/.xemacs if available. (savehist-length): Remove (use history-length instead). (savehist-file-modes): Rename from savehist-modes. (savehist-save-hook, savehist-loaded): New vars. (savehist-load): Use savehist-mode. Try to smooth up transition from old format to new format. (savehist-install): Allow savehist-autosave-interval to be nil. (savehist-save): Run the new hook. Be more careful to only trim the history variables. (savehist-trim-history): New fun. Replaces savehist-process-for-saving. (savehist-printable): Print into a buffer rather than char-by-char.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 01 Nov 2005 05:49:46 +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