summaryrefslogtreecommitdiff
path: root/3p/fetch.sh
blob: 44b76b140bc6fd82fdad4d34473b68eaf408cbb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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