summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuff-di-wuff16
1 files changed, 14 insertions, 2 deletions
diff --git a/buff-di-wuff b/buff-di-wuff
index 981e639..ad81169 100755
--- a/buff-di-wuff
+++ b/buff-di-wuff
@@ -11,8 +11,20 @@ mkdir -p \
"${cache_dir}/sha512sum"
grep '^[^#]' "$(dirname "$0")/downloads.list" | \
- while read -r url; do
- if echo "${url}" | \
+ while read -r url urlDir; do
+ if [ -n "${urlDir}" ]; then
+ urlFile=$(
+ printf '%s\n' "${url}" | \
+ sed '
+ s|\.|\.|g
+ s|*|.*|g
+ ' | tee /dev/stderr
+ )
+ wget --no-check-certificate -O - "${urlDir}" 2> /dev/null | \
+ tr '"<>' '\n' | \
+ grep "^${urlFile}\$" | \
+ sort -u
+ elif echo "${url}" | \
grep -q '\*[^/]*$'; then
urlDir=$(
printf '%s\n' "${url}" | \