diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/reproducible_lede_common.sh | 11 |
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() { |