summaryrefslogtreecommitdiff
path: root/.zs/components/buttons
blob: 8f4e166af48d36ce13082f2c131e2b73421d7ca0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

BUTTONS_DIR="assets/buttons/"

jq -r -f .zs/components/dl_buttons.jq buttons.json | while read url file; do
    if [ ! -d ".pub/$BUTTONS_DIR" ]; then
        mkdir ".pub/$BUTTONS_DIR"
    fi
    path=".pub/$BUTTONS_DIR/$file"
    if [ ! -f "$path" ]; then
        wget -O "$path" "$url"
    fi
done


jq -r --arg BUTTONS_DIR "$BUTTONS_DIR" -f .zs/components/buttons.jq buttons.json