summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-03-28 12:56:41 +0100
committerErich Eckner <git@eckner.net>2019-03-28 12:56:41 +0100
commit4550aad5fa42b7dec6ca75bf71d2a3890955ef98 (patch)
treea4255be65ea7425976db61bf0d1945ea6a08dfcb
parent80e575c391e81ad389da36e50a3612b887c98a6a (diff)
downloadbuff-di-wuff-4550aad5fa42b7dec6ca75bf71d2a3890955ef98.tar.xz
buff-di-wuff: prepend hostname in case of link starting with "/"
-rwxr-xr-xbuff-di-wuff3
1 files changed, 3 insertions, 0 deletions
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