Skip to content

Commit 2a98875

Browse files
alexveeclealexpdp7
authored andcommitted
Package lazygit
1 parent c8a6bb2 commit 2a98875

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

repo/lazygit.ubpkg.sky

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
gh = github_repo("jesseduffield/lazygit")
2+
3+
release = gh.latest_release()
4+
5+
os_str = {
6+
"linux": "Linux",
7+
"macos": "Darwin",
8+
"windows": "Windows",
9+
}[os]
10+
11+
arch_str = {
12+
"x86_64": "x86_64",
13+
"aarch64": "arm64",
14+
}[arch]
15+
16+
archive_format = {
17+
"linux": "tar.gz",
18+
"macos": "tar.gz",
19+
"windows": "zip",
20+
}[os]
21+
22+
version_str = release.name().removeprefix("v")
23+
24+
asset = release.get_asset_url("lazygit_{version_str}_{os_str}_{arch_str}.{archive_format}".format(version_str=version_str, os_str=os_str, arch_str=arch_str, archive_format=archive_format))
25+
26+
install_binary(extract_from_url(asset, "lazygit"), "lazygit")

0 commit comments

Comments
 (0)