New comment by pullmoll on void-packages repository https://github.com/void-linux/void-packages/pull/6395#issuecomment-497969538 Comment: I just now stumbled across this PR. Since `xbps-src` expects `bash` I think you could simplify the code by using an associative array of URLs. Something along the lines: ``` local -A fetchedurls … if [ "${fechedurls[$url]}" = "ok" ]; then if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then echo "already fetched $url" 1>&2 fi continue fi … fetchedurls[$url]="ok" ``` You could this way even store an error state and report that on a second try for the same `$url`.