@@ -113,22 +113,25 @@ trap cleanup_before_exit EXIT # The signal is specified here. Could be SIGINT, S
113
113
[ -z " ${LOG_LEVEL:- } " ] && emergency " Cannot continue without LOG_LEVEL. "
114
114
115
115
# 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
117
117
print_debug_only=7
118
118
if [ " $(( LOG_LEVEL < print_debug_only )) " -ne 0 ]; then
119
119
debug " Supressing info and debug messages: one of {-l, -v, -P, -U, -V, -D} present."
120
120
suppress_info_debug_messages
121
121
fi
122
122
fi
123
123
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]"
126
126
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]"
129
129
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]"
132
135
133
136
# ## Print bootstrapped magic variables to STDERR when LOG_LEVEL
134
137
# ## is at the default value (6) or above.
@@ -142,6 +145,8 @@ info "__os: ${__os}"
142
145
info " __usage: ${__usage} "
143
146
info " LOG_LEVEL: ${LOG_LEVEL} "
144
147
148
+ info " -b (--install-branch): ${arg_b} "
149
+ info " -B (--list-branches): ${arg_B} "
145
150
info " -c (--with-c): ${arg_c} "
146
151
info " -C (--with-cxx): ${arg_C} "
147
152
info " -d (--debug): ${arg_d} "
@@ -231,7 +236,6 @@ source $opencoarrays_src_dir/prerequisites/install-functions/report_results.sh
231
236
232
237
# ________________________________ Start of the Main Body ___________________________________
233
238
234
-
235
239
if [[ " ${arg_v} " == " ${__flag_present} " || " ${arg_V} " == " opencoarrays" ]]; then
236
240
237
241
# Print script copyright if invoked with -v, -V, or --version argument
@@ -255,10 +259,11 @@ if [[ "${arg_v}" == "${__flag_present}" || "${arg_V}" == "opencoarrays" ]]; then
255
259
echo " ${opencoarrays_version// [[:space:]]/ } "
256
260
fi
257
261
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
259
263
260
264
# 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"
262
267
[ ! -z " ${arg_D} " ] && build_flag=" -D"
263
268
[ ! -z " ${arg_P} " ] && build_flag=" -P"
264
269
[ ! -z " ${arg_U} " ] && build_flag=" -U"
@@ -284,7 +289,6 @@ elif [[ ! -z "${arg_D:-${arg_P:-${arg_U:-${arg_V}}}}" || "${arg_l}" == "${__fla
284
289
fi
285
290
286
291
elif [[ " ${arg_p:- } " == " opencoarrays" ]]; then
287
-
288
292
289
293
cd prerequisites || exit 1
290
294
installation_record=install-opencoarrays.log
0 commit comments