Skip to content

Instantly share code, notes, and snippets.

@overestimate
Last active June 4, 2022 09:23
Show Gist options
  • Save overestimate/33848847974679ff81fa4999af2c1c9b to your computer and use it in GitHub Desktop.
Save overestimate/33848847974679ff81fa4999af2c1c9b to your computer and use it in GitHub Desktop.
minimal mcsnipergo installer
#!/usr/bin/env python3
RELEASE_SUFFIX = '_Linux_64-bit'
import os
stream = os.popen('curl -sL https://api.github.com/repos/kqzz/mcsnipergo/releases')
res = stream.read()[:-1]
import json
obj = json.loads(res)
url = ""
for asset in obj[0]['assets']:
if RELEASE_SUFFIX in asset['name']:
url = asset['url']
if url == "":
print(f"binary not found")
os.exit(1)
os.system(f'curl --create-dirs -sLo ~/.local/bin/mcsnipergo {url}')
os.system('chmod +x ~/.local/bin/mcsnipergo')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment