mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 19:06:10 +00:00
8bfa653909
* Use cutter-deps for Linux * Update CMakeLists.txt for newer PySide2 * Add llvm-config --libdir to LD_LIBRARY_PATH in Travis * Update cutter-deps * Fix Python Prefix for Deploy * Update cutter-deps * Install Jupyter in Travis * Add update_deps.py and update * Enable Python Bindings for qmake in Travis * Use absolute path for src_list.py in qmake * Use python directly for src_list.py in qmake * Keep env for linuxdeployqt * Embed PySide2 in AppImage * Fix appimage_embed_python.sh
33 lines
972 B
Python
33 lines
972 B
Python
|
|
import sys
|
|
import os
|
|
import requests
|
|
import re
|
|
import subprocess
|
|
|
|
fetch_deps_path = os.path.join(os.path.dirname(sys.argv[0]), "fetch_deps.sh")
|
|
|
|
print("Fetching latest release")
|
|
json = requests.get("https://api.github.com/repos/radareorg/cutter-deps/releases/latest").json()
|
|
|
|
release_url = json["assets"][0]["browser_download_url"]
|
|
|
|
print(f"Getting MD5 for {release_url}")
|
|
|
|
curl = subprocess.Popen(["curl", "-L", release_url], stdout=subprocess.PIPE)
|
|
md5sum = subprocess.run(["md5sum"], stdin=curl.stdout, capture_output=True, encoding="utf-8").stdout
|
|
curl.wait()
|
|
|
|
md5sum = re.match("([a-zA-Z0-9]+) ", md5sum).group(1)
|
|
|
|
print(f"MD5: {md5sum}")
|
|
|
|
with open(fetch_deps_path) as f:
|
|
fetch_deps = f.read()
|
|
|
|
fetch_deps = re.sub("^URL=.*$", f"URL={release_url}".replace("\\", r"\\"), fetch_deps, flags=re.MULTILINE)
|
|
fetch_deps = re.sub("^MD5=.*$", f"MD5={md5sum}".replace("\\", r"\\"), fetch_deps, flags=re.MULTILINE)
|
|
|
|
with open(fetch_deps_path, "w") as f:
|
|
f.write(fetch_deps)
|