just: support structuredAttrs in setup hook

Tested cosmic-applibrary with and without __structuredAttrs.
This commit is contained in:
Wolfgang Walther 2024-06-09 16:24:40 +02:00
parent f96e20895f
commit c3900d12c9
No known key found for this signature in database
GPG Key ID: B39893FA5F65CAE1

View File

@ -1,7 +1,8 @@
justBuildPhase() {
runHook preBuild
local flagsArray=($justFlags "${justFlagsArray[@]}")
local flagsArray=()
concatTo flagsArray justFlags justFlagsArray
echoCmd 'build flags' "${flagsArray[@]}"
just "${flagsArray[@]}"
@ -21,10 +22,8 @@ justCheckPhase() {
if [ -z "${checkTarget:-}" ]; then
echo "no test target found in just, doing nothing"
else
local flagsArray=(
$justFlags "${justFlagsArray[@]}"
$checkTarget
)
local flagsArray=()
concatTo flagsArray justFlags justFlagsArray checkTarget
echoCmd 'check flags' "${flagsArray[@]}"
just "${flagsArray[@]}"
@ -36,8 +35,8 @@ justCheckPhase() {
justInstallPhase() {
runHook preInstall
# shellcheck disable=SC2086
local flagsArray=($justFlags "${justFlagsArray[@]}" ${installTargets:-install})
local flagsArray=()
concatTo flagsArray justFlags justFlagsArray installTargets=install
echoCmd 'install flags' "${flagsArray[@]}"
just "${flagsArray[@]}"