view move-if-change @ 51564:09736ff1baa6

(copyright-update-year): New function extracted from copyright-update. When `arg' is set, replace the year, not the `copyright' text. Ignore `copyright-update = nil' if called interactively. Use "," rather than ", " if that's what was used before. Recognize mixes of 2 and 4 digit years. Use replace-match. (copyright-update): Add interactivep arg. Use it instead of use last-command. Use replace-match. Don't assume (point-min) == 1.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 14 Jun 2003 20:11:12 +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