2011-07-04 16:25:32 +00:00
|
|
|
#!/usr/local/plan9/bin/rc
|
|
|
|
|
|
|
|
flag e +
|
|
|
|
|
|
|
|
fn updatetree{ # hg-id dir hg-url make-target
|
2012-04-20 11:35:31 +00:00
|
|
|
wd=`{pwd}
|
2011-07-04 16:25:32 +00:00
|
|
|
if (test -d $2) {
|
|
|
|
cd $2
|
|
|
|
if (! ~ `{hg id -n} $1) {
|
|
|
|
hg update $1
|
|
|
|
make $4
|
|
|
|
}
|
2012-04-20 11:35:31 +00:00
|
|
|
cd $wd
|
2011-07-04 16:25:32 +00:00
|
|
|
}
|
|
|
|
if (! test -d $2) {
|
|
|
|
hg clone $3 $2
|
|
|
|
cd $2
|
|
|
|
hg update $1
|
|
|
|
make $4
|
2012-04-20 11:35:31 +00:00
|
|
|
cd $wd
|
2011-07-04 16:25:32 +00:00
|
|
|
}
|
|
|
|
~ 0 0
|
|
|
|
}
|
|
|
|
|
2011-07-04 16:48:03 +00:00
|
|
|
test -f portid
|
|
|
|
test -f previd
|
2012-04-20 11:35:31 +00:00
|
|
|
mkdir -p ,,prevmd/src/github.com/knieriem
|
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
|
2012-04-20 11:35:31 +00:00
|
|
|
cd ,,prevmd
|
|
|
|
GOPATH=`{pwd}
|
|
|
|
updatetree $id src/github.com/knieriem/markdown .. cmd
|