mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-22 17:55:57 +01:00
relase: make github operations perfect
This commit is contained in:
committed by
Ciro Santilli
parent
b2238daee3
commit
60f0e98644
16
release-download-latest
Executable file
16
release-download-latest
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
'''
|
||||
Usage: https://github.com/cirosantilli/linux-kernel-module-cheat#prebuilt
|
||||
|
||||
Implementation:
|
||||
https://stackoverflow.com/questions/24987542/is-there-a-link-to-github-for-downloading-a-file-in-the-latest-release-of-a-repo/50540591#50540591
|
||||
'''
|
||||
|
||||
import urllib.request
|
||||
|
||||
import common
|
||||
|
||||
_json = common.github_make_request(path='/releases')
|
||||
asset = _json[0]['assets'][0]
|
||||
urllib.request.urlretrieve(asset['browser_download_url'], asset['name'])
|
||||
Reference in New Issue
Block a user