summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2017-04-28 13:54:59 +0200
committerHolger Levsen <holger@layer-acht.org>2017-04-28 13:58:59 +0200
commitaf624f5c8e11817a27302eaaccedb410dbdd71c9 (patch)
tree57dd30d428c40c489399b21e000156d53483fe25 /bin
parent2b830339d2318a6896ef4c1d749b9e8528b41114 (diff)
downloadjenkins.debian.net-af624f5c8e11817a27302eaaccedb410dbdd71c9.tar.xz
reproducible/openwrt|lede: retry downloads 5 times
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rw-r--r--bin/reproducible_lede_common.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/reproducible_lede_common.sh b/bin/reproducible_lede_common.sh
index 38cc2a53..ddfddc69 100644
--- a/bin/reproducible_lede_common.sh
+++ b/bin/reproducible_lede_common.sh
@@ -237,6 +237,7 @@ openwrt_download() {
local TARGET=$1
local CONFIG=$2
local TMPDIR=$3
+ local tries=5
cd $TMPDIR/download
@@ -253,7 +254,15 @@ openwrt_download() {
# configure openwrt because otherwise it wont download everything
openwrt_config $CONFIG
- make download -j $NUM_CPU IGNORE_ERRORS=ym BUILD_LOG=1
+ while ! make download -j $NUM_CPU IGNORE_ERRORS=ym BUILD_LOG=1 ; do
+ tries=$((tries - 1))
+ if [ $tries -eq 0 ] ; then
+ echo "================================================================================"
+ echo "$(date -u) - Failed to download sources"
+ echo "================================================================================"
+ exit 1
+ fi
+ done
}
openwrt_get_banner() {