view move-if-change @ 71984:bb119ed4db49

(Fload): Use xsignal2, signal_error. (end_of_file_error): Use xsignal0, xsignal1. (read0): Use xsignal1. (invalid_syntax): New error function marked no-return. (read_integer, read1, read_list): Use it.
author Kim F. Storm <storm@cua.dk>
date Tue, 18 Jul 2006 13:28:34 +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