diff options
author | Erich Eckner <git@eckner.net> | 2018-07-13 15:15:00 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-07-13 15:15:00 +0200 |
commit | 550ec57c321aca0b664afc41ba453fcbcbe156e9 (patch) | |
tree | f0966f11bf1dbf7d671b73f3df19ee016d0236ee | |
parent | 56791c1b1cee584c26fb6b68537e8b5143774753 (diff) | |
download | buff-di-wuff-550ec57c321aca0b664afc41ba453fcbcbe156e9.tar.xz |
buff-di-wuff: correct prefix
-rwxr-xr-x | buff-di-wuff | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/buff-di-wuff b/buff-di-wuff index c86965f..7cbe7cc 100755 --- a/buff-di-wuff +++ b/buff-di-wuff @@ -20,6 +20,9 @@ grep '^[^#]' "$(dirname "$0")/downloads.list" | \ printf '%s\n' "${url}" | \ sed 's|/[^/]*$|/|' ) + urlPrefix="${urlDir}" + else + urlPrefix="${url%/*}/" fi urlFile=$( printf '%s\n' "${url}" | \ @@ -33,7 +36,7 @@ grep '^[^#]' "$(dirname "$0")/downloads.list" | \ tr '"<>/' '\n' | \ grep "^${urlFile}\$" | \ sort -u | \ - xargs -r printf "${urlDir}%s\n" + xargs -r printf "${urlPrefix}%s\n" else printf '%s\n' "${url}" fi |