summaryrefslogtreecommitdiff
path: root/3p/fetch.sh
diff options
context:
space:
mode:
Diffstat (limited to '3p/fetch.sh')
-rw-r--r--3p/fetch.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/3p/fetch.sh b/3p/fetch.sh
new file mode 100644
index 0000000..44b76b1
--- /dev/null
+++ b/3p/fetch.sh
@@ -0,0 +1,14 @@
+#!/bin/sh -euC
+# run me from project root please! looks for -d ./3p/
+set -x
+
+notfile() { if [ -f "$1" ]; then echo "$1" bestaat al; false; fi; }
+fetch() { [ -d 3p ] && notfile "3p/$(basename "$1")" && wget -nc "$1" -O "3p/$(basename "$1")" ; }
+
+[ -d 3p ]
+
+cat urls.txt | while read url; do
+ fetch "$done"
+done
+
+set +x