download_and_compile.sh: remove some unnecessary quoting
Only in a few "crowded" places where this improves readability. Note that in these cases, the quote removal does *not* prevent the parameter values from containing spaces, tabs or newlines.
This commit is contained in:
@@ -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:" \
|
||||
|
||||
Reference in New Issue
Block a user