From 658447f6589d8aa91639370a39d66d98d0a4e07a Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Thu, 10 Feb 2022 19:43:56 +0200 Subject: [PATCH] Fix AUR snapshot download --- tools/getsource.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/getsource.sh b/tools/getsource.sh index 8d4bb9d..bd4737a 100755 --- a/tools/getsource.sh +++ b/tools/getsource.sh @@ -139,8 +139,8 @@ function fetch_database() { REPOMSG="Using Arch Linux user repositories (AUR)" if get_url "${SNAPSHOTURL}" "${URLFILE}"; then - FILEHREFS=($(grep -oP '(?<=href\=\"\/).*?(?=\"\>Download snapshot)' "${URLFILE}")) - FILENAMES=($(grep -oP '(?<=snapshot\/).*?(?=\"\>Download snapshot)' "${URLFILE}")) + FILEHREFS=($(grep -oPza '(?<=href\=\"\/).*?(?=\"\>(\s*)Download snapshot)' "${URLFILE}" | tr -d '\0')) + FILENAMES=(${FILEHREFS[@]/*\//}) download_sourcefiles && return 0 fi return 1