Skip to content

Commit

Permalink
Package toru
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpdp7 committed Oct 13, 2024
1 parent f3fc957 commit f68f07c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions repo/toru.ubpkg.sky
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit f68f07c

Please sign in to comment.