From 037dda12bc82dad91fc6b76f0a811028b026c33e Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 13 Sep 2022 22:49:27 +0200 Subject: bin/curld new --- bin/curld | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 bin/curld (limited to 'bin') diff --git a/bin/curld b/bin/curld new file mode 100755 index 0000000..6bfc016 --- /dev/null +++ b/bin/curld @@ -0,0 +1,19 @@ +#!/bin/bash + +work_dir=$(readlink -e "$0") +work_dir="${work_dir%/*/*}/work" + +if [ ! -d "${work_dir}/files" ]; then + mkdir -p "${work_dir}/files" +fi + +while read -r url64; do + [ -s "${work_dir}/files/${url64}" ] && continue + url=$( + printf -- '%s\n' "${url64}" \ + | base64 -d \ + || exit $? + ) + curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o "${work_dir}/files/${url64}" "${url}" +done \ +<"${work_dir}/wishlist" -- cgit v1.2.3-70-g09d2