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