aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/rosa.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-07-23 18:02:50 +0900
committerOphestra <cat@gensokyo.uk>2026-07-23 18:02:50 +0900
commit09de93995549d5c5de58abff15f2b10c453d0361 (patch)
tree14723b25d8afe0b4ba38193c7c63d74727ad1a2c /internal/rosa/rosa.go
parente0eec632d0a7cca2fb09e026997fa9a39dcd7504 (diff)
internal/rosa: make build script executable
This makes it slightly easier to invoke when working on a package via --enter. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/rosa.go')
-rw-r--r--internal/rosa/rosa.go15
1 files changed, 11 insertions, 4 deletions
diff --git a/internal/rosa/rosa.go b/internal/rosa/rosa.go
index 97351f10..de4229ea 100644
--- a/internal/rosa/rosa.go
+++ b/internal/rosa/rosa.go
@@ -197,9 +197,12 @@ func fixupEnviron(env, extras []string, paths ...string) []string {
return append(extras, env...)
}
+// scriptName is the name of the fixed-up build script.
+const scriptName = "all"
+
// absCureScript is the absolute pathname [Toolchain.New] places the fixed-up
// build script under.
-var absCureScript = AbsSystem.Append(".cure-script")
+var absCureScript = AbsSystem.Append(scriptName)
const (
// TExclusive denotes an exclusive [pkg.Artifact].
@@ -310,15 +313,19 @@ mkdir -vp /work/system/bin
flag&THostNet != 0,
flag&TExclusive != 0,
fhs.AbsRoot, env,
- AbsSystem.Append("bin", "sh"),
- []string{"sh", absCureScript.String()},
+ absCureScript,
+ nil,
slices.Concat([]pkg.ExecPath{pkg.Path(
fhs.AbsRoot, true,
support...,
), pkg.Path(
absCureScript, false,
- pkg.NewFile(".cure-script", []byte("set -eu -o pipefail\n"+script)),
+ pkg.NewFile(scriptName, []byte(
+ "#!/system/bin/sh\n"+
+ "set -eu -o pipefail\n"+
+ script,
+ )),
)}, paths)...,
)
}