]> git.pld-linux.org Git - packages/apache-mod_pagespeed.git/blobdiff - get-source.sh
up to 1.8.31.6-stable
[packages/apache-mod_pagespeed.git] / get-source.sh
index 79b24f115807ab7b4cad3ae3b4d2a74d354c99f5..064638af372610ae8b9427beb084e18f8e940ecd 100755 (executable)
@@ -16,7 +16,7 @@ force=0
 # abort on errors
 set -e
 # work in package dir
-dir=$(dirname "$0")
+dir=$(readlink -f $(dirname "$0"))
 cd "$dir"
 
 if [[ "$1" = *force ]]; then
@@ -30,7 +30,8 @@ fi
 
 if [ -z "$version" ]; then
        echo "Looking for latest version..."
-       version=$(svn ls $baseurl/tags/ | grep '^[0-9]' | sort -V | tail -n1)
+       # exclude 1.9.x beta
+       version=$(svn ls $baseurl/tags/ | grep '^[0-9]' | grep -vE '^1\.9\.' | sort -V | tail -n1)
        version=${version%/}
 fi
 
@@ -57,35 +58,44 @@ if python -c "import sys; sys.exit(sys.version[:3] > '2.6')"; then
        exit 1
 fi
 
-# http://www.chromium.org/developers/how-tos/install-depot-tools
-test -d depot_tools || {
-       # could also checkout:
-       # svn co http://src.chromium.org/svn/trunk/tools/depot_tools
-       wget -c https://src.chromium.org/svn/trunk/tools/depot_tools.zip
-       unzip -qq depot_tools.zip
-       chmod a+x depot_tools/gclient depot_tools/update_depot_tools
-}
+gclient=$(which gclient 2>/dev/null)
+if [ -z "$gclient" ]; then
+       # http://www.chromium.org/developers/how-tos/install-depot-tools
+       test -d depot_tools || {
+               # could also checkout:
+               # svn co http://src.chromium.org/svn/trunk/tools/depot_tools
+               wget -c https://src.chromium.org/svn/trunk/tools/depot_tools.zip
+               unzip -qq depot_tools.zip
+               chmod a+x depot_tools/gclient depot_tools/update_depot_tools
+       }
+       gclient=$topdir/depot_tools/gclient
+fi
 
 topdir=${PWD:-($pwd)}
-gclient=$topdir/gclient.conf
+gclientfile=$topdir/gclient.conf
 install -d $package
 cd $package
 
-if [ ! -f $gclient ]; then
+if [ ! -f $gclientfile ]; then
        # create initial config that can be later modified
-       ../depot_tools/gclient config $svnurl --gclientfile=$gclient
+       $gclient config $svnurl --gclientfile=$gclientfile
 fi
 
-cp -p $gclient .gclient
+cp -p $gclientfile .gclient
 
 # emulate gclient config, preserving our deps
 sed -i -re '/"url"/ s,"http[^"]+","'$svnurl'",' .gclient
 
-../depot_tools/gclient sync --nohooks -v
+$gclient sync --nohooks -v
+
+cd src
+
+sh -x $dir/clean-source.sh
 
 # Populate the LASTCHANGE file template as we will not include VCS info in tarball
-(cd src && ./build/lastchange.sh . -o LASTCHANGE.in)
-cd ..
+./build/lastchange.sh . -o LASTCHANGE.in
+
+cd ../..
 
 XZ_OPT=-e9 \
 tar --transform="s:^$package/src:$release_dir:" \
This page took 0.028431 seconds and 4 git commands to generate.