From 4550aad5fa42b7dec6ca75bf71d2a3890955ef98 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 28 Mar 2019 12:56:41 +0100 Subject: buff-di-wuff: prepend hostname in case of link starting with "/" --- buff-di-wuff | 3 +++ 1 file changed, 3 insertions(+) diff --git a/buff-di-wuff b/buff-di-wuff index 822a15d..b248dff 100755 --- a/buff-di-wuff +++ b/buff-di-wuff @@ -43,6 +43,9 @@ grep '^[^#]' "$(dirname "$0")/downloads.list" | \ wget --no-check-certificate -O - "${urlDir}" 2> /dev/null | \ tr '"<>'"${spacer}" '\n' | \ grep '\(^\|/\)'"${urlFile}\$" | \ + sed ' + s@^/@'"${urlPrefix}"'@ + ' | \ sort -u | \ xargs -r printf "${urlPrefix}%s\n" else -- cgit v1.2.3-70-g09d2