@@ -113,22 +113,25 @@ trap cleanup_before_exit EXIT # The signal is specified here. Could be SIGINT, S
113113[ -z " ${LOG_LEVEL:- } " ] && emergency " Cannot continue without LOG_LEVEL. "
114114
115115# shellcheck disable=SC2154
116- if [[ " ${arg_v} " == " ${__flag_present} " || " ${arg_l} " == " ${__flag_present} " || ! -z " ${arg_P:- ${arg_U:- ${arg_V:- ${arg_D} } } } " ]]; then
116+ if [[ " ${arg_v} " == " ${__flag_present} " || " ${arg_l} " == " ${__flag_present} " || ! -z " ${arg_P:- ${arg_U:- ${arg_V:- ${arg_D:- ${arg_B} } } } } " ]]; then
117117 print_debug_only=7
118118 if [ " $(( LOG_LEVEL < print_debug_only )) " -ne 0 ]; then
119119 debug " Supressing info and debug messages: one of {-l, -v, -P, -U, -V, -D} present."
120120 suppress_info_debug_messages
121121 fi
122122fi
123123
124- [ ! -z " ${arg_D} " ] && [ ! -z " ${arg_P:- ${arg_U:- ${arg_V} } } " ] &&
125- emergency " Please pass only one of {-D, -p, -P, -U, -V} or a longer equivalent (multiple detected). [exit 101]"
124+ [ ! -z " ${arg_D} " ] && [ ! -z " ${arg_P:- ${arg_U:- ${arg_V:- ${arg_B} } } } " ] &&
125+ emergency " Please pass only one of {-B, - D, -p, -P, -U, -V} or a longer equivalent (multiple detected). [exit 101]"
126126
127- [ ! -z " ${arg_P} " ] && [ ! -z " ${arg_U:- ${arg_V} } " ] &&
128- emergency " Please pass only one of {-D, -p, -P, -U, -V} or a longer equivalent (multiple detected). [exit 103]"
127+ [ ! -z " ${arg_P} " ] && [ ! -z " ${arg_U:- ${arg_V:- ${arg_B} } } " ] &&
128+ emergency " Please pass only one of {-B, - D, -p, -P, -U, -V} or a longer equivalent (multiple detected). [exit 103]"
129129
130- [ ! -z " ${arg_U} " ] && [ ! -z " ${arg_V} " ] &&
131- emergency " Please pass only one of {-D, -p, -P, -U, -V} or a longer equivalent (multiple detected). [exit 104]"
130+ [ ! -z " ${arg_U} " ] && [ ! -z " ${arg_V:- ${arg_B} } " ] &&
131+ emergency " Please pass only one of {-B, -D, -p, -P, -U, -V} or a longer equivalent (multiple detected). [exit 104]"
132+
133+ [ ! -z " ${arg_V} " ] && [ ! -z " ${arg_B} }" ] &&
134+ emergency " Please pass only one of {-B, -D, -p, -P, -U, -V} or a longer equivalent (multiple detected). [exit 104]"
132135
133136# ## Print bootstrapped magic variables to STDERR when LOG_LEVEL
134137# ## is at the default value (6) or above.
@@ -142,6 +145,8 @@ info "__os: ${__os}"
142145info " __usage: ${__usage} "
143146info " LOG_LEVEL: ${LOG_LEVEL} "
144147
148+ info " -b (--install-branch): ${arg_b} "
149+ info " -B (--list-branches): ${arg_B} "
145150info " -c (--with-c): ${arg_c} "
146151info " -C (--with-cxx): ${arg_C} "
147152info " -d (--debug): ${arg_d} "
@@ -231,7 +236,6 @@ source $opencoarrays_src_dir/prerequisites/install-functions/report_results.sh
231236
232237# ________________________________ Start of the Main Body ___________________________________
233238
234-
235239if [[ " ${arg_v} " == " ${__flag_present} " || " ${arg_V} " == " opencoarrays" ]]; then
236240
237241 # Print script copyright if invoked with -v, -V, or --version argument
@@ -255,10 +259,11 @@ if [[ "${arg_v}" == "${__flag_present}" || "${arg_V}" == "opencoarrays" ]]; then
255259 echo " ${opencoarrays_version// [[:space:]]/ } "
256260 fi
257261
258- elif [[ ! -z " ${arg_D:- ${arg_P:- ${arg_U:- ${arg_V} } } } " || " ${arg_l} " == " ${__flag_present} " ]]; then
262+ elif [[ ! -z " ${arg_D:- ${arg_P:- ${arg_U:- ${arg_V:- ${arg_B} } } } } " || " ${arg_l} " == " ${__flag_present} " ]]; then
259263
260264 # Delegate to build.sh for the packages it builds
261- build_arg=${arg_D:- ${arg_P:- ${arg_U:- ${arg_V:- ${arg_p} } } } }
265+ build_arg=${arg_B:- ${arg_D:- ${arg_P:- ${arg_U:- ${arg_V:- ${arg_p} } } } } }
266+ [ ! -z " ${arg_B} " ] && build_flag=" -B"
262267 [ ! -z " ${arg_D} " ] && build_flag=" -D"
263268 [ ! -z " ${arg_P} " ] && build_flag=" -P"
264269 [ ! -z " ${arg_U} " ] && build_flag=" -U"
@@ -284,7 +289,6 @@ elif [[ ! -z "${arg_D:-${arg_P:-${arg_U:-${arg_V}}}}" || "${arg_l}" == "${__fla
284289 fi
285290
286291elif [[ " ${arg_p:- } " == " opencoarrays" ]]; then
287-
288292
289293 cd prerequisites || exit 1
290294 installation_record=install-opencoarrays.log
0 commit comments