#!/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