Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
run_command() {
local pkg
- local action
+ local actions=()
local chroot="false"
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
"-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?