]> git.pld-linux.org Git - packages/apache-mod_pagespeed.git/blame - get-source.sh
- 0.9.18.9 tarball
[packages/apache-mod_pagespeed.git] / get-source.sh
CommitLineData
757b3ba5
ER
1#!/bin/sh
2# Usage:
3# ./get-source.sh
4# Author: Elan Ruusamäe <glen@pld-linux.org>
5
6pkg=modpagespeed
7baseurl=http://modpagespeed.googlecode.com/svn
40de8a4b 8# leave empty to use latest tag, or "trunk" for trunk
ef0f87bf 9version=
757b3ba5
ER
10spec=apache-mod_pagespeed.spec
11
12# abort on errors
13set -e
757b3ba5
ER
14# work in package dir
15dir=$(dirname "$0")
16cd "$dir"
17
40de8a4b
ER
18if [ "$1" ]; then
19 version=$1
20fi
21
22if [ -z "$version" ]; then
23 echo "Looking for latest version..."
24 version=$(svn ls $baseurl/tags/ | sort -V | tail -n1)
ef0f87bf 25 version=${version%/}
40de8a4b
ER
26fi
27
28if [ "$version" = "trunk" ]; then
29 echo "Using trunk"
757b3ba5
ER
30 svnurl=$baseurl/trunk/src
31 tarball=$pkg-$(date +%Y%m%d).tar.bz2
40de8a4b
ER
32else
33 echo "Version: $version"
34 svnurl=$baseurl/tags/$version/src
35 tarball=$pkg-$version.tar.bz2
757b3ba5
ER
36fi
37
ef0f87bf
ER
38# gclient needs python 2.6
39if python -c "import sys; sys.exit(sys.version[:3] > '2.6')"; then
40 echo >&2 "Need python >= 2.6 for gclient"
41 exit 1
42fi
43
757b3ba5
ER
44wget -c http://src.chromium.org/svn/trunk/tools/depot_tools.tar.gz
45test -d depot_tools || tar xzf depot_tools.tar.gz
46
47install -d $pkg
48cd $pkg
49# force update
50rm -f .gclient
51
52../depot_tools/gclient config $svnurl
53../depot_tools/gclient sync
54
55# Populate the LASTCHANGE file template as we will not include VCS info in tarball
56(cd src/build && svnversion > LASTCHANGE.in)
57cd ..
58
59tar -cjf $tarball --exclude-vcs $pkg
60../md5 $spec
61../dropin $tarball &
This page took 0.037526 seconds and 4 git commands to generate.