summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElan Ruusamäe2012-12-07 10:19:52 (GMT)
committerElan Ruusamäe2012-12-07 10:19:52 (GMT)
commit1d2833757b6ef76c5832e0440b09fa9ff1fc8aad (patch)
treeebb86178a39458bbddf21d431eac36a03dc7ced7
parent3c7e8519f1b57759498dcd9ca0e1dd917ccd5a5f (diff)
downloadcrossnacl-gcc-1d2833757b6ef76c5832e0440b09fa9ff1fc8aad.zip
crossnacl-gcc-1d2833757b6ef76c5832e0440b09fa9ff1fc8aad.tar.gz
- update for omahaproxy changes
-rwxr-xr-xget-source.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/get-source.sh b/get-source.sh
index 500923c..ac2584d 100755
--- a/get-source.sh
+++ b/get-source.sh
@@ -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"