view move-if-change @ 99678:aeb2c2c4af7a

* custom.texi (Easy Customization): Use "init file" instead of .emacs. (Customization Groups): Update to new Custom buffer appearance. (Saving Customizations): Copyedits. Update example. (Variables): Give example of variable type-sensitivity. (Examining): Update example. (Hooks): Copyedits. (Specifying File Variables): Use C comments instead of an artificial Lisp for the example. (Keymaps): Move internals discussion to Prefix Keymaps. (Rebinding): Remove redundant paragraph (stated in Key Binding). (Init Rebinding): Document kbd macro. (Init File): Link to Find Init.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 17 Nov 2008 23:08:58 +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