CI Changes
This commit is contained in:
committed by
aerinon
parent
54858500e5
commit
ca40f87daa
@@ -21,10 +21,11 @@ if not os.path.isdir(os.path.join(".","upx")):
|
||||
UPX_FILE = UPX_SLUG + ".tar.xz"
|
||||
UPX_URL = "https://github.com/upx/upx/releases/download/v" + UPX_VERSION + '/' + UPX_FILE
|
||||
|
||||
# if it's not macos
|
||||
if "osx" not in env["OS_NAME"]:
|
||||
|
||||
print("Getting UPX: " + UPX_FILE)
|
||||
|
||||
# download UPX
|
||||
with open(os.path.join(".",UPX_FILE),"wb") as upx:
|
||||
UPX_REQ = urllib.request.Request(
|
||||
UPX_URL,
|
||||
@@ -34,8 +35,10 @@ if not os.path.isdir(os.path.join(".","upx")):
|
||||
UPX_DATA = UPX_REQ.read()
|
||||
upx.write(UPX_DATA)
|
||||
|
||||
# extract UPX
|
||||
unpack_archive(UPX_FILE,os.path.join("."))
|
||||
|
||||
# move UPX
|
||||
os.rename(os.path.join(".",UPX_SLUG),os.path.join(".","upx"))
|
||||
os.remove(os.path.join(".",UPX_FILE))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user