diff --git a/download_and_compile.sh b/download_and_compile.sh index 462f51c..defe2b6 100755 --- a/download_and_compile.sh +++ b/download_and_compile.sh @@ -1081,10 +1081,10 @@ while true; do --lts) SELECTED_SUITE=latest-lts; shift ;; --old-lts) SELECTED_SUITE=old-lts; shift ;; --component-branch) - if [[ "$2" =~ ^([-_a-zA-Z0-9]+)=(.+)$ ]]; then - verbatim_component="${BASH_REMATCH[1]}" - component="${BASH_REMATCH[1]^^}" # convert the component to uppercase - branch="${BASH_REMATCH[2]}" + if [[ $2 =~ ^([-_a-zA-Z0-9]+)=(.+)$ ]]; then + verbatim_component=${BASH_REMATCH[1]} + component=${BASH_REMATCH[1]^^} # convert the component to uppercase + branch=${BASH_REMATCH[2]} if ! _elementIn "$component" "${WHATTOBUILD_AVAIL[@]}"; then echo "Invalid component passed to option --component-branch:" \ @@ -1130,11 +1130,11 @@ while true; do shift 2 ;; --git-clone-site-params) - if [[ "$2" =~ ^([[:alnum:]]+)=([[:alpha:]]+)(:([-_.[:alnum:]]+))?$ ]]; then - site="${BASH_REMATCH[1],,}" # convert the site to lowercase - verbatim_proto="${BASH_REMATCH[2]}" - proto="${verbatim_proto,,}" # ditto for the protocol - username="${BASH_REMATCH[4]}" # but take the username verbatim + if [[ $2 =~ ^([[:alnum:]]+)=([[:alpha:]]+)(:([-_.[:alnum:]]+))?$ ]]; then + site=${BASH_REMATCH[1],,} # convert the site to lowercase + verbatim_proto=${BASH_REMATCH[2]} + proto=${verbatim_proto,,} # ditto for the protocol + username=${BASH_REMATCH[4]} # but take the username verbatim if ! _elementIn "$proto" ssh https git; then echo "Invalid protocol passed to option --git-clone-site-params:" \