From e53291c48cc8a86f6231056888046c682aa9da2c Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 5 Jul 2024 10:19:33 +0000 Subject: [PATCH] make.sh: Allow run_command to execute multiple actions at a time Signed-off-by: Michael Tremer --- make.sh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/make.sh b/make.sh index 400f41689..0e87b78f0 100755 --- a/make.sh +++ b/make.sh @@ -740,7 +740,7 @@ lfsmake1() { run_command() { local pkg - local action + local actions=() local chroot="false" @@ -760,14 +760,9 @@ run_command() { if [ -z "${pkg}" ]; then pkg="${1}" - # Set action - elif [ -z "${action}" ]; then - action="${1}" - - # Fail on everything else + # Set actions else - echo "Unknown argument: ${1}" >&2 - return 2 + actions+=( "${1}" ) fi ;; esac @@ -782,7 +777,7 @@ run_command() { "-x" # Run the following command - "-c" "cd /usr/src/lfs && make -f ${pkg} LFS_BASEDIR=/usr/src ${action}" + "-c" "cd /usr/src/lfs && make -f ${pkg} LFS_BASEDIR=/usr/src ${actions[@]}" ) # Run this in chroot? -- 2.39.5