]> git.pld-linux.org Git - packages/closure-compiler.git/blob - get-source.sh
- up to 20111003
[packages/closure-compiler.git] / get-source.sh
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
8
9 html() {
10         if [ -z "$html" ]; then
11                 html=$(lynx -width 1200 -dump -nolist "$dl")
12         fi
13         echo "$html"
14 }
15
16 rev=$(html | perl -nne '/'$fn'-latest.tar.gz.*Build at r(\d+)/and print $1')
17 date=$(html | perl -ne '/'$fn'-(\d+).tar.gz.*Build at r'$rev'/and print $1')
18
19 d=$p-$date
20 if [ ! -d "$d" ]; then
21         svn export -q $svn@$rev $p-$date
22 fi
23
24 t=$d.tar.bz2
25 if [ ! -f "$t" ]; then
26         tar -cjf $t --exclude-vcs $d
27 fi
This page took 0.058204 seconds and 3 git commands to generate.