forked from rosa/hakurei
internal/rosa: configurable architecture
This enables curing via binfmt. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"hakurei.app/fhs"
|
||||
@@ -88,7 +87,7 @@ func (a busyboxBin) Cure(t *pkg.TContext) (err error) {
|
||||
// the https://busybox.net/downloads/binaries/ binary release.
|
||||
func newBusyboxBin() pkg.Artifact {
|
||||
var version, url, checksum string
|
||||
switch runtime.GOARCH {
|
||||
switch arch {
|
||||
case "amd64":
|
||||
version = "1.35.0"
|
||||
url = "https://busybox.net/downloads/binaries/" +
|
||||
@@ -101,7 +100,7 @@ func newBusyboxBin() pkg.Artifact {
|
||||
checksum = "npJjBO7iwhjW6Kx2aXeSxf8kXhVgTCDChOZTTsI8ZfFfa3tbsklxRiidZQdrVERg"
|
||||
|
||||
default:
|
||||
panic("unsupported target " + runtime.GOARCH)
|
||||
panic("unsupported target " + arch)
|
||||
}
|
||||
|
||||
return pkg.NewExec(
|
||||
|
||||
Reference in New Issue
Block a user