view move-if-change @ 5787:10395934b99e

Add :risky and :safe options to defcustom. 2014-01-27 Michael Sperber <mike@xemacs.org> * custom.el (custom-declare-variable, defcustom): Add :risky and :safe options
author Mike Sperber <sperber@deinprogramm.de>
date Mon, 27 Jan 2014 17:41:46 +0100
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