Browse Source

deploy: ae571bfccd

live_develop
GilbN 3 years ago
parent
commit
8fe7ca6fe5
  1. 17
      fetch.sh

17
fetch.sh

@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Downloads all docker mod scripts
MODS=$(curl https://develop.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/$key" --silent
echo "Fetched $key script"
done
sudo chmod go+rx $DIR
Loading…
Cancel
Save