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...)
|
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
|
// absCureScript is the absolute pathname [Toolchain.New] places the fixed-up
|
||||||
// build script under.
|
// build script under.
|
||||||
var absCureScript = AbsSystem.Append(".cure-script")
|
var absCureScript = AbsSystem.Append(scriptName)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// TExclusive denotes an exclusive [pkg.Artifact].
|
// TExclusive denotes an exclusive [pkg.Artifact].
|
||||||
@@ -310,15 +313,19 @@ mkdir -vp /work/system/bin
|
|||||||
flag&THostNet != 0,
|
flag&THostNet != 0,
|
||||||
flag&TExclusive != 0,
|
flag&TExclusive != 0,
|
||||||
fhs.AbsRoot, env,
|
fhs.AbsRoot, env,
|
||||||
AbsSystem.Append("bin", "sh"),
|
absCureScript,
|
||||||
[]string{"sh", absCureScript.String()},
|
nil,
|
||||||
|
|
||||||
slices.Concat([]pkg.ExecPath{pkg.Path(
|
slices.Concat([]pkg.ExecPath{pkg.Path(
|
||||||
fhs.AbsRoot, true,
|
fhs.AbsRoot, true,
|
||||||
support...,
|
support...,
|
||||||
), pkg.Path(
|
), pkg.Path(
|
||||||
absCureScript, false,
|
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)...,
|
)}, paths)...,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user