summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-07-13 14:51:11 +0200
committerErich Eckner <git@eckner.net>2018-07-13 14:51:11 +0200
commitd0db1b4c1e880590ed98c510d5fe90c0cc89b56e (patch)
treecdd2df3b32618f0d9559f18bc7995da2405217d0
parentbf487e34bd26a2a2ade2bce9c4520b4bfac880f3 (diff)
downloadbuff-di-wuff-d0db1b4c1e880590ed98c510d5fe90c0cc89b56e.tar.xz
buff-di-wuff: kann jetzt auf seiten mit Link zu github
-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}" | \