Gen7Data/fetch_tester.sh

12 lines
502 B
Bash
Raw Normal View History

2021-08-29 11:24:31 +00:00
#!/bin/sh
2021-09-07 17:56:33 +00:00
TESTERVERSION=0.0.4
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