diff --git a/repo/toru.ubpkg.sky b/repo/toru.ubpkg.sky new file mode 100644 index 0000000..74e8de7 --- /dev/null +++ b/repo/toru.ubpkg.sky @@ -0,0 +1,25 @@ +gh = github_repo("sweetbbak/toru") + +# Currently, Toru has a tag without a version. +release = gh.release(version) if version else gh.latest_release() + +os_str = { + "linux": "Linux", + "macos": "Darwin", + "windows": "Windows", +}[os] + +arch_str = { + "x86_64": "x86_64", + "aarch64": "arm64", +}[arch] + +archive_format = { + "linux": "tar.gz", + "macos": "tar.gz", + "windows": "zip", +}[os] + +asset = release.get_asset_url("toru_{os_str}_{arch_str}.{archive_format}".format(os_str=os_str, arch_str=arch_str, archive_format=archive_format)) + +install_binary(extract_from_url(asset, "toru"), "toru")