]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
make.sh: Pass variables before the commands
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 9 Jul 2024 09:33:33 +0000 (09:33 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 9 Jul 2024 09:33:33 +0000 (09:33 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index c48a7e278d312267ba8659f56ea84c2905cb88b2..1d65e4ecdf59bb0153a17525c3a13f469aab326d 100755 (executable)
--- 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