markdown/misc/bmprepare.rc

34 lines
523 B
Plaintext
Raw Normal View History

2011-07-04 16:25:32 +00:00
#!/usr/local/plan9/bin/rc
flag e +
fn updatetree{ # hg-id dir hg-url make-target
if (test -d $2) {
cd $2
if (! ~ `{hg id -n} $1) {
hg update $1
make $4
}
cd ..
}
if (! test -d $2) {
hg clone $3 $2
cd $2
hg update $1
make $4
cd ..
}
~ 0 0
}
2011-07-04 16:48:03 +00:00
test -f portid
test -f previd
2011-07-04 16:25:32 +00:00
2011-07-04 16:48:03 +00:00
id=`{cat portid}
echo '*' prepare original c-based peg-markdown $id
updatetree $id ,,pmd git://github.com/jgm/peg-markdown.git ()
2011-07-04 16:25:32 +00:00
2011-07-04 16:48:03 +00:00
id=`{cat previd}
echo '*' prepare "previous version" $id
updatetree $id ,,prevmd . all