Skip to content

Commit 6a6470f

Browse files
committed
zip dataset downloader
1 parent beca4c7 commit 6a6470f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

downloader.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
4+
5+
lists="$(
6+
find "$dir/datasets" "$dir/testbench/tests/datasets" \
7+
-type f -name 'download.txt'
8+
)"
9+
10+
for list in $lists; do
11+
cd "$(dirname "$list")" || exit 1
12+
cat <"$list" | while IFS= read -r line; do
13+
curl -L -o ./data.zip "$line" &&
14+
unzip -u ./data.zip &&
15+
rm ./data.zip
16+
done
17+
done

0 commit comments

Comments
 (0)