X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=get-source.sh;h=77afafcf2e4ad03ba4f47bb2805c0c3bffcfc8e2;hb=81528b2e7791e855d1b20d951ed36f1e15deab9b;hp=804feb75de4a598a08d1587284bb639369af7309;hpb=a6cd2124bc6b2fb570ccddad4deee1c0ec362542;p=packages%2Fcrossnacl-gcc.git diff --git a/get-source.sh b/get-source.sh index 804feb7..77afafc 100755 --- a/get-source.sh +++ b/get-source.sh @@ -16,7 +16,7 @@ set -e package=nacl-gcc repo_url=http://git.chromium.org/native_client/$package.git nacl_trunk=http://src.chromium.org/native_client/trunk -omahaproxy_url=https://omahaproxy.appspot.com +omahaproxy_url=http://omahaproxy.appspot.com specfile=crossnacl-gcc.spec # if you get errors that sha1 hash not found, try increasing depth @@ -24,13 +24,12 @@ specfile=crossnacl-gcc.spec depth=5 chrome_channel=${1:-stable} -chrome_version=$(curl -s "$omahaproxy_url/?os=linux&channel=$chrome_channel" | awk -F, 'NR > 1{print $3}') +chrome_version=$(curl -s "$omahaproxy_url/all?os=linux&channel=$chrome_channel" | awk -F, 'NR > 1{print $3}') test -n "$chrome_version" -chrome_revision=$(curl -s $omahaproxy_url/revision?version=$chrome_version) +chrome_revision=$((echo 'data='; curl -s $omahaproxy_url/revision.json?version=$chrome_version; echo ',print(data.chromium_revision)') | js) test -n "$chrome_revision" chrome_branch=$(IFS=.; set -- $chrome_version; echo $3) - -test -e DEPS.py || svn cat http://src.chromium.org/chrome/branches/$chrome_branch/src/DEPS@$chrome_revision > DEPS.py +test -s DEPS.py || svn cat http://src.chromium.org/chrome/branches/$chrome_branch/src/DEPS@$chrome_revision > DEPS.py nacl_revision=$(awk -F'"' '/nacl_revision.:/{print $4}' DEPS.py) test -n "$nacl_revision" @@ -47,7 +46,7 @@ fi # get src/native_client/tools/REVISIONS directly from svn test -n "$nacl_revision" -test -e NACL_REVISIONS.sh || svn cat $nacl_trunk/src/native_client/tools/REVISIONS@$nacl_revision > NACL_REVISIONS.sh +test -s NACL_REVISIONS.sh || svn cat $nacl_trunk/src/native_client/tools/REVISIONS@$nacl_revision > NACL_REVISIONS.sh if grep -Ev '^(#|(LINUX_HEADERS_FOR_NACL|NACL_(BINUTILS|GCC|GDB|GLIBC|NEWLIB))_COMMIT=[0-9a-f]+$|)' NACL_REVISIONS.sh >&2; then echo >&2 "I refuse to execute grabbed file for security concerns" @@ -59,16 +58,16 @@ githash=$NACL_GCC_COMMIT version=$(git show $githash:gcc/BASE-VER) shorthash=$(git rev-parse --short $githash) prefix=$package-$version-git$shorthash +archive=$prefix.tar.xz -if [ -f $prefix.tar.xz ]; then - echo "Tarball $prefix.tar.xz already exists at $shorthash" +if [ -f $archive ]; then + echo "Tarball $archive already exists at $shorthash" rm -f NACL_REVISIONS.sh DEPS.py exit 0 fi -git archive $githash --prefix $prefix/ > $prefix.tar -xz -9 $prefix.tar +git -c tar.tar.xz.command="xz -9c" archive $githash --prefix $prefix/ -o $archive -../dropin $prefix.tar.xz +../dropin $archive rm -f NACL_REVISIONS.sh DEPS.py