aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/squashfs.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-04-13 15:23:41 +0900
committerOphestra <cat@gensokyo.uk>2026-04-13 18:02:57 +0900
commit83b0e32c550bf47eea826be7403183bf8f412850 (patch)
treeabfe8a5c2aec066a705ba92405b8366ebcd973b2 /internal/rosa/squashfs.go
parenteeaf26e7a24c5c51c64fc333284015224e851e8c (diff)
internal/rosa: helpers for common url formats
This cleans up call site of NewPackage. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/squashfs.go')
-rw-r--r--internal/rosa/squashfs.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/rosa/squashfs.go b/internal/rosa/squashfs.go
index 43c9f2e4..3ac6e6d0 100644
--- a/internal/rosa/squashfs.go
+++ b/internal/rosa/squashfs.go
@@ -7,10 +7,11 @@ func (t Toolchain) newSquashfsTools() (pkg.Artifact, string) {
version = "4.7.5"
checksum = "rF52wLQP-jeAmcD-48wqJcck8ZWRFwkax3T-7snaRf5EBnCQQh0YypMY9lwcivLz"
)
- return t.NewPackage("squashfs-tools", version, pkg.NewHTTPGetTar(
- nil, "https://github.com/plougher/squashfs-tools/releases/"+
- "download/"+version+"/squashfs-tools-"+version+".tar.gz",
- mustDecode(checksum),
+ return t.NewPackage("squashfs-tools", version, newFromGitHubRelease(
+ "plougher/squashfs-tools",
+ version,
+ "squashfs-tools-"+version+".tar.gz",
+ checksum,
pkg.TarGzip,
), &PackageAttr{
// uses source tree as scratch space