view move-if-change @ 92916:f296fd96bd7c

(calendar-cursor-to-nearest-date): Use or, when. Move definition before use. (calendar-cursor-to-visible-date): Move definition before use. (calendar-scroll-left): Use unless and zerop. Combine lets into one, and place inside the conditional. (calendar-forward-day): Simplify. (calendar-end-of-month): Use unless. (calendar-goto-day-of-year): Doc fix. Relocate obsolete aliases after their replacements.
author Glenn Morris <rgm@gnu.org>
date Fri, 14 Mar 2008 06:44:47 +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