diff options
author | Danilo Šegan <danilo.segan@linaro.org> | 2012-11-29 15:08:30 +0100 |
---|---|---|
committer | Danilo Šegan <danilo.segan@linaro.org> | 2012-11-29 15:08:30 +0100 |
commit | 2416a4e81a80a171394717a92659b45d57085947 (patch) | |
tree | cc2186a137d6fe1dc78dc094e477b2eed7492ad3 /build-scripts/helpers | |
parent | 3524f793eee91359dde4827f1e60e534b7d4735c (diff) | |
parent | e59ace2db5f1d5d11acab81400aced8ffc567eec (diff) |
Use ci.linaro.org as the http_proxy for repo sync.
Diffstat (limited to 'build-scripts/helpers')
-rw-r--r-- | build-scripts/helpers | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/build-scripts/helpers b/build-scripts/helpers index ac0c251..be86bc0 100644 --- a/build-scripts/helpers +++ b/build-scripts/helpers @@ -181,3 +181,15 @@ product2lamc_dev () { echo -n "$1";; esac } + +# Check if a proxy is accessible using wget. +set_proxy_if_accessible() { + proxy_address=http://ci.linaro.org:3128/ + export http_proxy=$proxy_address + wget -q -O /dev/null --timeout=10 http://android.git.linaro.org/ || unset http_proxy + if [ -z "$http_proxy" ]; then + echo "WARNING: Proxy at $proxy_address doesn't work." + else + echo "INFO: http_proxy set to '$http_proxy'." + fi +} |