summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2022-09-13 22:49:27 +0200
committerErich Eckner <git@eckner.net>2022-09-13 22:49:27 +0200
commit037dda12bc82dad91fc6b76f0a811028b026c33e (patch)
tree35372cad0baa46e9397b0ab642c81eedfbda0bbc /bin
parent0e88034af8e2729f51b4e91e0cd73080143800a9 (diff)
downloadairgapd-037dda12bc82dad91fc6b76f0a811028b026c33e.tar.xz
bin/curld new
Diffstat (limited to 'bin')
-rwxr-xr-xbin/curld19
1 files changed, 19 insertions, 0 deletions
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"