diff options
author | Erich Eckner <git@eckner.net> | 2018-07-13 14:51:11 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-07-13 14:51:11 +0200 |
commit | d0db1b4c1e880590ed98c510d5fe90c0cc89b56e (patch) | |
tree | cdd2df3b32618f0d9559f18bc7995da2405217d0 | |
parent | bf487e34bd26a2a2ade2bce9c4520b4bfac880f3 (diff) | |
download | buff-di-wuff-d0db1b4c1e880590ed98c510d5fe90c0cc89b56e.tar.xz |
buff-di-wuff: kann jetzt auf seiten mit Link zu github
-rwxr-xr-x | buff-di-wuff | 16 |
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}" | \ |