view move-if-change @ 72817:b70548506872

(sit-for): Rework to use input-pending-p and cond. Return nil input is pending on entry also for SECONDS <= 0. (while-no-input): Use input-pending-p instead of sit-for.
author Kim F. Storm <storm@cua.dk>
date Mon, 11 Sep 2006 22:21:55 +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