Skip to content

Commit f68f07c

Browse files
committed
Package toru
1 parent f3fc957 commit f68f07c

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

repo/toru.ubpkg.sky

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
gh = github_repo("sweetbbak/toru")
2+
3+
# Currently, Toru has a tag without a version.
4+
release = gh.release(version) if version else gh.latest_release()
5+
6+
os_str = {
7+
"linux": "Linux",
8+
"macos": "Darwin",
9+
"windows": "Windows",
10+
}[os]
11+
12+
arch_str = {
13+
"x86_64": "x86_64",
14+
"aarch64": "arm64",
15+
}[arch]
16+
17+
archive_format = {
18+
"linux": "tar.gz",
19+
"macos": "tar.gz",
20+
"windows": "zip",
21+
}[os]
22+
23+
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))
24+
25+
install_binary(extract_from_url(asset, "toru"), "toru")

0 commit comments

Comments
 (0)