summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2020-03-15 18:49:58 +0100
committeremkael <emkael@tlen.pl>2020-03-15 18:49:58 +0100
commit82e88178e020afb07c6442d8c73d80c232566289 (patch)
tree1d7c16d6b48c1694ec2c37d0d131397b7d4ba789
parent1216f583b1e62f6ca4b00246417880d5e04905ad (diff)
Downloader script
-rwxr-xr-xdownload.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/download.sh b/download.sh
new file mode 100755
index 0000000..e5c08b0
--- /dev/null
+++ b/download.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+URL=$1
+OUTPUT_DIR=$2
+pushd $OUTPUT_DIR
+ROUNDS=$3
+SEGMENTS=$4
+BOARDS=$5
+for RND in `seq 1 $ROUNDS`
+do
+ for SEGMENT in `seq 1 $SEGMENTS`
+ do
+ for BOARD in `seq 1 $BOARDS`
+ do
+ wget ${URL}${RND}b-$((($SEGMENT - 1) * $BOARDS + $BOARD)).html
+ done
+ wget ${URL}${RND}t1-${SEGMENT}.html
+ done
+done
+popd