Gen7Data/fetch_tester.sh

12 lines
503 B
Bash
Raw Normal View History

2021-08-29 11:24:31 +00:00
#!/bin/sh
2021-10-30 16:45:42 +00:00
TESTERVERSION=0.0.10
2021-08-29 11:24:31 +00:00
# Get the release information from the api for the specified version
2021-08-29 11:24:31 +00:00
curl -X GET "https://git.p-epsilon.com/api/v1/repos/Deukhoofd/PokemonScriptTester/releases/tags/$TESTERVERSION" -H "accept: application/json" |
2021-08-29 13:26:16 +00:00
# Parse as json, select the url we need to download the file
jq '.assets[] | select(.name=="PokemonScriptTester") .browser_download_url ' |
# Download the file at the given url
xargs curl > PokemonScriptTester
chmod +x PokemonScriptTester