From 2b1ba2ba6070e7b4944d007ce53bfc6d8cfd6043 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 9 Jul 2024 09:33:33 +0000 Subject: [PATCH] make.sh: Pass variables before the commands Signed-off-by: Michael Tremer --- make.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/make.sh b/make.sh index c48a7e278..1d65e4ecd 100755 --- a/make.sh +++ b/make.sh @@ -777,6 +777,7 @@ run_command() { local basedir="${BASEDIR}" local command=() + local env=() local quiet="false" while [ $# -gt 0 ]; do @@ -797,6 +798,10 @@ run_command() { return 2 ;; + *=*) + env+=( "${1}" ) + ;; + *) # Set pkg if [ -z "${pkg}" ]; then @@ -820,7 +825,7 @@ run_command() { "-x" # Run the following command - "-c" "cd ${basedir}/lfs && make -f ${pkg} LFS_BASEDIR=${basedir} ${actions[@]}" + "-c" "cd ${basedir}/lfs && make -f ${pkg} LFS_BASEDIR=${basedir} ${env[@]} ${actions[@]}" ) # Return code -- 2.39.5