From f68f07cebe738919ace4626632a6b2a2162a07b8 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 13 Oct 2024 12:22:13 +0200 Subject: [PATCH] Package toru --- repo/toru.ubpkg.sky | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 repo/toru.ubpkg.sky 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")