Skip to content

Commit a6976ea

Browse files
committed
also silently retry latesturl
1 parent fef82b3 commit a6976ea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

makedist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ fi
379379
# $1 - base repository url
380380
# $2 - package name
381381
# $3 - true if base url has one-character subdirectories, otherwise false
382+
LATESTRETRY=0
382383
latesturl()
383384
{
384385
typeset URL="$1"
@@ -388,7 +389,14 @@ latesturl()
388389
fi
389390
typeset PKG="$(curl $CURLOPTS "$URL"|grep ${2}-[0-9].*$ARCH|grep -v 32bit|grep -v mirrorlist|tail -1|sed 's/.*href="//;s/".*//')"
390391
if [ -n "$PKG" ]; then
392+
LATESTRETRY=0
391393
echo "$URL/$PKG"
394+
elif [ "$LATESTRETRY" -lt 3 ]; then
395+
let LATESTRETRY=$LATESTRETRY+1
396+
latesturl "$URL" "$2" false
397+
else
398+
LATESTRETRY=0
399+
return 1
392400
fi
393401
}
394402

0 commit comments

Comments
 (0)