From: Michael Tremer Date: Fri, 5 Jul 2024 10:19:33 +0000 (+0000) Subject: make.sh: Allow run_command to execute multiple actions at a time X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e53291c48cc8a86f6231056888046c682aa9da2c;p=people%2Fms%2Fipfire-2.x.git make.sh: Allow run_command to execute multiple actions at a time Signed-off-by: Michael Tremer --- 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?