From bb0b85060cb3b736c580725215d8b28c5e7c82a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Mon, 29 Apr 2019 10:23:15 +0200 Subject: [PATCH] update-check: never omit specified site --- common/xbps-src/shutils/update_check.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh index 615bf63c6b4..30982b1351a 100644 --- a/common/xbps-src/shutils/update_check.sh +++ b/common/xbps-src/shutils/update_check.sh @@ -31,6 +31,8 @@ update_check() { # filter loop: if version are "folder" name based, # substitute original url by every folder based ones (expand) while IFS= read -r url; do + # default case: don't rewrite url + printf '%s\n' "$url" rx= urlpfx="${url}" urlsfx= @@ -45,10 +47,7 @@ update_check() { rx='href="\K[\d\.]+(?=/")' ;; esac - if [ -z "$rx" ]; then - # default case: don't rewrite url - printf '%s\n' "$url" - else + if [ "$rx" ]; then # substitute url if needed if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then echo "(folder) fetching $urlpfx" 1>&2