internal/rosa: make build script executable
Test / Create distribution (push) Successful in 50s
Test / Sandbox (push) Successful in 3m24s
Test / ShareFS (push) Successful in 4m44s
Test / Hakurei (push) Successful in 4m53s
Test / Sandbox (race detector) (push) Successful in 6m12s
Test / Hakurei (race detector) (push) Successful in 7m29s
Test / Flake checks (push) Successful in 3m25s
Test / Create distribution (push) Successful in 50s
Test / Sandbox (push) Successful in 3m24s
Test / ShareFS (push) Successful in 4m44s
Test / Hakurei (push) Successful in 4m53s
Test / Sandbox (race detector) (push) Successful in 6m12s
Test / Hakurei (race detector) (push) Successful in 7m29s
Test / Flake checks (push) Successful in 3m25s
This makes it slightly easier to invoke when working on a package via --enter. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
+11
-4
@@ -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)...,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user