We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3313288 commit 7a66791Copy full SHA for 7a66791
repo/typst.ubpkg.sky
@@ -0,0 +1,21 @@
1
+gh = github_repo("typst/typst")
2
+
3
+release = gh.latest_release("^v[0-9]+\.[0-9]+\.[0-9]+$")
4
5
+rest = {
6
+ ("macos", "aarch64"): "aarch64-apple-darwin",
7
+ ("macos", "x86_64"): "x86_64-apple-darwin",
8
+ ("linux", "x86_64"): "x86_64-unknown-linux-musl",
9
+ ("linux", "aarch64"): "aarch64-unknown-linux-musl",
10
+ ("windows", "x86_64"): "x86_64-pc-windows-msvc",
11
+}[(os, arch)]
12
13
+archive_format = {
14
+ "linux": "tar.xz",
15
+ "macos": "tar.xz",
16
+ "windows": "zip",
17
+}[os]
18
19
+asset = release.get_asset_url("typst-{rest}.{archive_format}".format(rest=rest, archive_format=archive_format))
20
21
+install_binary(extract_from_url(asset, "typst-{rest}/typst".format(rest=rest)), "typst")
0 commit comments