Skip to content

Commit 7427946

Browse files
committed
Add support to parse build params from _buildparams file
To allow for custom build tweaks such as `-j1` and `--vm-custom-opt=-cpu qemu64` written as separate lines in `_buildparams`
1 parent 74e4efc commit 7427946

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

build

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,7 @@ run_shell() {
10431043
fi
10441044
}
10451045

1046+
parse_args() {
10461047
validate_init "$BUILD_CONF"
10471048

10481049
while test -n "$1"; do
@@ -1366,6 +1367,14 @@ while test -n "$1"; do
13661367
validate_param "$PARAM" "$ARG"
13671368
fi
13681369
done
1370+
}
1371+
buildparams=()
1372+
if [ -e _buildparams ] ; then
1373+
while read ARG ; do
1374+
buildparams+=("$ARG")
1375+
done < _buildparams
1376+
fi
1377+
parse_args "$@" "${buildparams[@]}"
13691378

13701379
# validate params coming from the environment
13711380
test -n "$BUILD_ARCH" && validate_param "--arch" "$BUILD_ARCH" BUILD_ARCH

0 commit comments

Comments
 (0)