aboutsummaryrefslogtreecommitdiff
path: root/download-tilesets.sh
blob: 0b9a5ec9397094543c8e63b9974d270a884117e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

cd ${0%/*} # go to project root

URL="https://ftp.batnako.net/tilesets/"

mkdir -p "files/tilesets"

function download {
    path="files/tilesets/$name"

    rm -rf "$path"
    mkdir "$path"

    for ((i=0; i<${#tiles[@]}; i++)); do image="${tiles[$i]}.ppm"
        wget -O "$path/$image" "$URL/$name/$image"
    done
}

name="black-white"
tiles=("corner" "cross" "empty" "line" "t")
download

name="knots"
tiles=("corner" "cross" "empty" "line" "t")
download

name="circuit"
tiles=("bridge" "component" "connection" "corner" "dskew" "skew" "substrate" "t" "track" "transition" "turn" "viad" "vias" "wire")
download