view move-if-change @ 5525:2a6a8da4dd7c

Fix a bug in my last commit, symbol macros that expand to themselves hang. 2011-06-19 Aidan Kehoe <kehoea@parhasard.net> * cl-macs.el (cl-defsubst-expand): It is occasionally the case that the symbol naming the argument co-incides with the value that it is replacing; in that case, using the symbol macro is counterproductive and hangs XEmacs (as does analogous code in SBCL), so don't.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 19 Jun 2011 19:47:13 +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