From: Michael Tremer Date: Tue, 9 Jul 2024 09:33:33 +0000 (+0000) Subject: make.sh: Pass variables before the commands X-Git-Tag: v2.29-core188~10^2~315 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a272cfe406cd15758df2ef0bd093bafc15c5657;p=ipfire-2.x.git make.sh: Pass variables before the commands Signed-off-by: Michael Tremer --- diff --git a/make.sh b/make.sh index c48a7e278d..1d65e4ecdf 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