You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
509 B

#!/usr/bin/env bash
# Downloads all docker mod scripts
2 years ago
MODS=$(curl https://theme-park.dev/themes.json | jq -r '.["docker-mods"]')
if [[ "$0" == "bash" ]]; then
DIR="/tmp/theme-park-mods"
else
DIR="$0"
fi
mkdir -p "$DIR"
printf "\nSaving mods into $DIR\n\n"
jq -r 'to_entries | map(.key + "|" + (.value | tostring)) | .[]' <<< "$MODS" | \
while IFS='|' read key value; do
curl "$value" --create-dirs --output "$DIR/98-themepark-$key" --silent
echo "Fetched $key script"
done
2 years ago
chmod -R +x $DIR