mirror of https://github.com/PrimeDecomp/prime.git
Windows fixes for download_dtk.py and shasum
Former-commit-id: 89e083cc54
This commit is contained in:
parent
6f994fbe28
commit
c2fdf35ed9
|
@ -1464,7 +1464,7 @@ if __name__ == "__main__":
|
|||
n.comment("Check DOL hash")
|
||||
n.rule(
|
||||
name="check",
|
||||
command=ALLOW_CHAIN + "$dtk shasum -c $in && touch $out",
|
||||
command="$dtk shasum -c $in -o $out",
|
||||
description="CHECK $in",
|
||||
)
|
||||
n.build(
|
||||
|
|
|
@ -1 +1 @@
|
|||
v0.1.0
|
||||
v0.1.1
|
||||
|
|
|
@ -2,6 +2,7 @@ import argparse
|
|||
import urllib.request
|
||||
import os
|
||||
import stat
|
||||
import platform
|
||||
from pathlib import Path
|
||||
|
||||
REPO = "https://github.com/encounter/decomp-toolkit"
|
||||
|
@ -16,18 +17,18 @@ def main():
|
|||
with open(args.tag_file, "r") as f:
|
||||
tag = f.readline().rstrip()
|
||||
|
||||
uname = os.uname()
|
||||
uname = platform.uname()
|
||||
suffix = ""
|
||||
platform = uname.sysname.lower()
|
||||
if platform == "darwin":
|
||||
platform = "macos"
|
||||
elif platform == "windows":
|
||||
system = uname.system.lower()
|
||||
if system == "darwin":
|
||||
system = "macos"
|
||||
elif system == "windows":
|
||||
suffix = ".exe"
|
||||
arch = uname.machine.lower()
|
||||
if arch == "amd64":
|
||||
arch = "x86_64"
|
||||
|
||||
url = f"{REPO}/releases/download/{tag}/dtk-{platform}-{arch}{suffix}"
|
||||
url = f"{REPO}/releases/download/{tag}/dtk-{system}-{arch}{suffix}"
|
||||
output = args.output
|
||||
# print(f"Downloading {url} to {output}")
|
||||
urllib.request.urlretrieve(url, output)
|
||||
|
|
Loading…
Reference in New Issue