view move-if-change @ 104658:7b5e19f7e726

(read_integer): Use doubles (and potentially return a float number) as we do in string-to-number. (read1): Use strtol to read integers, signal errors on strtol's overflow and use floats if strtol's output is too large for Elisp integers.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 27 Aug 2009 21:10:17 +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