hgbook

annotate en/fixsvg @ 717:eb4381bae2f2

Add caution.png
author Dongsheng Song <songdongsheng@live.cn>
date Thu May 21 16:57:06 2009 +0800 (2009-05-21)
parents fb5c0d56d7f1
children
rev   line source
hg@307 1 #!/bin/bash
hg@307 2
bos@309 3 test -d hello || hg clone http://hg.serpentine.com/tutorial/hello
bos@309 4
bos@309 5 set -e
hg@307 6
hg@307 7 for i in 0 1 2 3 4
hg@307 8 do
bos@309 9 export REV$i=$(hg --cwd hello log -r $i --template '{node|short}' | cut -c1-4)
hg@307 10 done
bos@309 11 export REV_my_hello=$(cat /tmp/REV5.my-hello)
bos@309 12 export REV_my_new_hello=$(cat /tmp/REV5.my-new-hello)
bos@309 13 export REV6_my_new_hello=$(cat /tmp/REV6.my-new-hello)
bos@309 14 export REV7_my_new_hello=$(cat /tmp/REV7.my-new-hello)
hg@307 15
hg@307 16 FILE=$1
bos@309 17 OUTFILE=$FILE-tmp.svg
bos@309 18 rm -f $OUTFILE
hg@307 19 echo "Fixing $FILE"
bos@309 20 cp $FILE $OUTFILE
bos@309 21 perl -p -i -e "s#REV0#$REV0#" $OUTFILE
bos@309 22 perl -p -i -e "s#REV1#$REV1#" $OUTFILE
bos@309 23 perl -p -i -e "s#REV2#$REV2#" $OUTFILE
bos@309 24 perl -p -i -e "s#REV3#$REV3#" $OUTFILE
bos@309 25 perl -p -i -e "s#REV4#$REV4#" $OUTFILE
bos@309 26 perl -p -i -e "s#REV_my_hello#$REV_my_hello#" $OUTFILE
bos@309 27 perl -p -i -e "s#REV_my_new_hello#$REV_my_new_hello#" $OUTFILE
bos@309 28 perl -p -i -e "s#REV6_my_new_hello#$REV6_my_new_hello#" $OUTFILE
bos@309 29 perl -p -i -e "s#REV7_my_new_hello#$REV7_my_new_hello#" $OUTFILE