From 91b55c69428bfe8e906bff6f087ac48ff4cddf52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 17 Sep 2024 10:54:05 +0200 Subject: [PATCH] linkcheck: use array to pass args --- checks/linkcheck/lychee.sh | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/checks/linkcheck/lychee.sh b/checks/linkcheck/lychee.sh index 8d3aba0..9fca97b 100755 --- a/checks/linkcheck/lychee.sh +++ b/checks/linkcheck/lychee.sh @@ -16,19 +16,19 @@ python3 ../main.py filter wikidump.xml wikidump-filtered.xml # generate exclude args from allowlist python3 ../main.py badlinks ../allowed.links exclude-args -# exlude sending requests to the wiki -echo "--exclude wiki.nixos.org/wiki" >>exclude-args -extrargs="$extrargs --exclude wiki.nixos.org/wiki" -excludeargs=$(cat exclude-args) +extrargs=( + # exlude sending requests to the wiki + "--exclude" "wiki.nixos.org/wiki" + # default is too high + "--max-concurrency" "16" +) +read -r -a excludeargs <<<"$(lychee.json # get archive suggestions # --timeout not working with --suggest see https://github.com/lycheeverse/lychee/issues/1501 # TODO remove timeout command later after the issue is fixed -# shellcheck disable=SC2086 timeout 30 lychee -E \ --cache --scheme http --scheme https \ - --include-verbatim $excludeargs $extrargs \ + --include-verbatim "${excludeargs[@]}" "${extrargs[@]}" \ --suggest \ text | tee lychee-wayback.log