mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
make.sh: Pass variables before the commands
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
7
make.sh
7
make.sh
@@ -777,6 +777,7 @@ run_command() {
|
|||||||
|
|
||||||
local basedir="${BASEDIR}"
|
local basedir="${BASEDIR}"
|
||||||
local command=()
|
local command=()
|
||||||
|
local env=()
|
||||||
local quiet="false"
|
local quiet="false"
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
@@ -797,6 +798,10 @@ run_command() {
|
|||||||
return 2
|
return 2
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
*=*)
|
||||||
|
env+=( "${1}" )
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
# Set pkg
|
# Set pkg
|
||||||
if [ -z "${pkg}" ]; then
|
if [ -z "${pkg}" ]; then
|
||||||
@@ -820,7 +825,7 @@ run_command() {
|
|||||||
"-x"
|
"-x"
|
||||||
|
|
||||||
# Run the following command
|
# 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
|
# Return code
|
||||||
|
|||||||
Reference in New Issue
Block a user