aboutsummaryrefslogtreecommitdiff
path: root/node/setup-build-android
diff options
context:
space:
mode:
Diffstat (limited to 'node/setup-build-android')
-rwxr-xr-xnode/setup-build-android13
1 files changed, 10 insertions, 3 deletions
diff --git a/node/setup-build-android b/node/setup-build-android
index 6f3f3af..3c4051c 100755
--- a/node/setup-build-android
+++ b/node/setup-build-android
@@ -12,6 +12,11 @@ set -xe
# Stubborn apt-get, retrying on errors
apt-get-retry () {
+ local fatal="yes";
+ if [ "$1" == "--non-fatal" ]; then
+ fatal=""
+ shift
+ fi
local delay=1;
while [ $delay -lt 100 ]; do
if apt-get "$@"; then
@@ -21,8 +26,10 @@ apt-get-retry () {
sleep $delay
delay=$((delay * 2))
done
- echo "apt-get failed after several attempts, aborting"
- exit 1
+ if [ -n "$fatal" ]; then
+ echo "apt-get failed after several attempts, aborting"
+ exit 1
+ fi
}
@@ -34,7 +41,7 @@ mv repo /usr/local/bin/repo
chmod a+x /usr/local/bin/repo
sed -i.bk 's,^\(.*://[^.]*.ec2.archive.ubuntu.com\)/,\1.s3.amazonaws.com/,' /etc/apt/sources.list
-apt-get-retry update
+apt-get-retry --non-fatal update
# We do update as part of early node init (to get this script actually)
#apt-get update