34 lines
523 B
Bash
34 lines
523 B
Bash
#!/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
|
|
}
|
|
|
|
test -f portid
|
|
test -f previd
|
|
|
|
id=`{cat portid}
|
|
echo '*' prepare original c-based peg-markdown $id
|
|
updatetree $id ,,pmd git://github.com/jgm/peg-markdown.git ()
|
|
|
|
id=`{cat previd}
|
|
echo '*' prepare "previous version" $id
|
|
updatetree $id ,,prevmd . all
|