view move-if-change @ 1548:5365af805d4c

[xemacs-hg @ 2003-06-30 09:24:47 by stephent] maybe compile docstring as value <87n0fz9ax2.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Mon, 30 Jun 2003 09:24:47 +0000
parents 376386a54a3c
children
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