]>
Commit | Line | Data |
---|---|---|
59a6cf4b ER |
1 | #!/bin/sh |
2 | p=closure-compiler | |
3 | fn=compiler | |
4 | svn=http://$p.googlecode.com/svn/trunk | |
5 | dl=https://code.google.com/p/$p/downloads/list?can=3 | |
6 | ||
7 | set -x | |
17217d80 | 8 | set -e |
59a6cf4b ER |
9 | |
10 | html() { | |
11 | if [ -z "$html" ]; then | |
12 | html=$(lynx -width 1200 -dump -nolist "$dl") | |
13 | fi | |
14 | echo "$html" | |
15 | } | |
16 | ||
17217d80 ER |
17 | rev=$(html | perl -ne '/'$fn'-.+tar.*Buil[dt] at r?(\d+)/and print $1') |
18 | test -n "$rev" | |
19 | ||
20 | date=$(html | perl -ne '/'$fn'-(\d+).tar.gz.*Built at r?'$rev'/and print $1') | |
21 | test -n "$date" | |
59a6cf4b ER |
22 | |
23 | d=$p-$date | |
24 | if [ ! -d "$d" ]; then | |
25 | svn export -q $svn@$rev $p-$date | |
26 | fi | |
27 | ||
28 | t=$d.tar.bz2 | |
29 | if [ ! -f "$t" ]; then | |
30 | tar -cjf $t --exclude-vcs $d | |
31 | fi |