From be4d06341564ec53a85fe2a2da9aaef0e963016a Mon Sep 17 00:00:00 2001 From: krcroft Date: Tue, 10 Dec 2019 17:11:33 -0800 Subject: [PATCH] Allow extra arguments to become ./configure flags --- scripts/build.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index a2f80c48..bdddab73 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -29,13 +29,14 @@ function parse_args() { # Gather the parameters that define this build postfix="" modifiers=("") + configure_additions=("") while [[ "${#}" -gt 0 ]]; do case ${1} in - -c|--compiler) compiler="${2}"; shift 2;; - -v|--version-postfix) postfix="-${2}"; shift 2;; - -t|--build-type) selected_type="${2}"; shift 2;; - -m|--modifier) modifiers+=("${2}"); shift 2;; - -p|--bin-path) PATH="${2}:${PATH}"; shift 2;; - *) >&2 echo "Unknown parameter: ${1}"; exit 1; shift 2;; + -c|--compiler) compiler="${2}"; shift 2;; + -v|--version-postfix) postfix="-${2}"; shift 2;; + -t|--build-type) selected_type="${2}"; shift 2;; + -m|--modifier) modifiers+=("${2}"); shift 2;; + -p|--bin-path) PATH="${2}:${PATH}"; shift 2;; + *) configure_additions+=("${1}"); shift;; esac; done # Import our settings and report missing values