]>
Commit | Line | Data |
---|---|---|
757b3ba5 ER |
1 | #!/bin/sh |
2 | # Usage: | |
3 | # ./get-source.sh | |
4 | # Author: Elan Ruusamäe <glen@pld-linux.org> | |
5 | ||
6 | pkg=modpagespeed | |
7 | baseurl=http://modpagespeed.googlecode.com/svn | |
8 | # leave empty to use trunk | |
9 | version=0.9.17.7 | |
10 | spec=apache-mod_pagespeed.spec | |
11 | ||
12 | # abort on errors | |
13 | set -e | |
14 | ||
15 | # work in package dir | |
16 | dir=$(dirname "$0") | |
17 | cd "$dir" | |
18 | ||
19 | if [ -n "$version" ]; then | |
20 | svnurl=$baseurl/tags/$version/src | |
21 | tarball=$pkg-$version.tar.bz2 | |
22 | else | |
23 | svnurl=$baseurl/trunk/src | |
24 | tarball=$pkg-$(date +%Y%m%d).tar.bz2 | |
25 | fi | |
26 | ||
27 | wget -c http://src.chromium.org/svn/trunk/tools/depot_tools.tar.gz | |
28 | test -d depot_tools || tar xzf depot_tools.tar.gz | |
29 | ||
30 | install -d $pkg | |
31 | cd $pkg | |
32 | # force update | |
33 | rm -f .gclient | |
34 | ||
35 | ../depot_tools/gclient config $svnurl | |
36 | ../depot_tools/gclient sync | |
37 | ||
38 | # Populate the LASTCHANGE file template as we will not include VCS info in tarball | |
39 | (cd src/build && svnversion > LASTCHANGE.in) | |
40 | cd .. | |
41 | ||
42 | tar -cjf $tarball --exclude-vcs $pkg | |
43 | ../md5 $spec | |
44 | ../dropin $tarball & |