mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-30 05:24:25 +01:00
release: make runnable again
Create download-latest-release helper
This commit is contained in:
11
download-latest-release
Executable file
11
download-latest-release
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import json
|
||||
import urllib.request
|
||||
|
||||
_json = json.loads(urllib.request.urlopen(urllib.request.Request(
|
||||
'https://api.github.com/repos/cirosantilli/linux-kernel-module-cheat/releases',
|
||||
headers={'Accept' : 'application/vnd.github.full+json"text/html'}
|
||||
)).read())
|
||||
asset = _json[0]['assets'][0]
|
||||
urllib.request.urlretrieve(asset['browser_download_url'], asset['name'])
|
||||
Reference in New Issue
Block a user