@@ -110,22 +110,22 @@ trap cleanup_before_exit EXIT # The signal is specified here. Could be SIGINT, S
110
110
111
111
[ -z " ${LOG_LEVEL:- } " ] && emergency " Cannot continue without LOG_LEVEL. "
112
112
113
- [ ! -z " ${arg_D} " ] && [ ! -z " ${arg_p:- ${arg_P:- ${arg_U:- ${arg_V} } } } " ] &&
114
- emergency " Please pass only one of {-D, -p, -P, -U, -V} or a longer equivalent (multiple detected)."
113
+ if [[ " ${arg_v} " == " ${__flag_present} " || " ${arg_l} " == " ${__flag_present} " || ! -z " ${arg_P:- ${arg_U:- ${arg_V:- ${arg_D} } } } " ]]; then
114
+ print_debug_only=7
115
+ if [ " $(( LOG_LEVEL < print_debug_only )) " -ne 0 ]; then
116
+ debug " Supressing info and debug messages: one of {-l, -v, -P, -U, -V, -D} present."
117
+ suppress_info_debug_messages
118
+ fi
119
+ fi
115
120
116
- [ ! -z " ${arg_p } " ] && [ ! -z " ${arg_P:- ${arg_U:- ${arg_V} } } " ] &&
117
- emergency " Please pass only one of {-D, -p, -P, -U, -V} or a longer equivalent (multiple detected)."
121
+ [ ! -z " ${arg_D } " ] && [ ! -z " ${arg_P:- ${arg_U:- ${arg_V} } } " ] &&
122
+ emergency " Please pass only one of {-D, -p, -P, -U, -V} or a longer equivalent (multiple detected). [exit 101] "
118
123
119
124
[ ! -z " ${arg_P} " ] && [ ! -z " ${arg_U:- ${arg_V} } " ] &&
120
- emergency " Please pass only one of {-D, -p, -P, -U, -V} or a longer equivalent (multiple detected)."
125
+ emergency " Please pass only one of {-D, -p, -P, -U, -V} or a longer equivalent (multiple detected). [exit 103] "
121
126
122
127
[ ! -z " ${arg_U} " ] && [ ! -z " ${arg_V} " ] &&
123
- emergency " Please pass only one of {-D, -p, -P, -U, -V} or a longer equivalent (multiple detected)."
124
-
125
- if [[ " ${arg_v} " == " ${__flag_present} " || " ${arg_l} " == " ${__flag_present} " || ! -z " ${arg_P:- ${arg_U:- ${arg_V:- ${arg_D} } } } " ]]; then
126
- debug " Supressing info and debug messages: one of {-l, -v, -P, -U, -V, -D} present."
127
- suppress_info_debug_messages
128
- fi
128
+ emergency " Please pass only one of {-D, -p, -P, -U, -V} or a longer equivalent (multiple detected). [exit 104]"
129
129
130
130
# ## Print bootstrapped magic variables to STDERR when LOG_LEVEL
131
131
# ## is at the default value (6) or above.
@@ -183,17 +183,17 @@ info "-V (--print-version): ${arg_V}"
183
183
184
184
export this_script=` basename $0 `
185
185
186
- export install_path=" ${arg_i} "
187
- info " install_path=${arg_i} "
186
+ export install_path=" ${arg_i} / ${arg_p} "
187
+ info " install_path=${arg_i} / ${arg_p} "
188
188
189
189
export num_threads=" ${arg_j} "
190
190
info " num_threads=${arg_j} "
191
191
192
192
export opencoarrays_src_dir=" ${OPENCOARRAYS_SRC_DIR} "
193
193
info " opencoarrays_src_dir=${OPENCOARRAYS_SRC_DIR} "
194
194
195
- export build_path=$opencoarrays_src_dir /prerequisites/build_directories
196
- info " build_path=$opencoarrays_src_dir /prerequisites/build_directories "
195
+ export build_path=$opencoarrays_src_dir /prerequisites/builds
196
+ info " build_path=$opencoarrays_src_dir /prerequisites/builds "
197
197
198
198
export build_script=$opencoarrays_src_dir /prerequisites/build.sh
199
199
info " build_script=$opencoarrays_src_dir /prerequisites/build.sh"
@@ -243,13 +243,20 @@ if [[ "${arg_v}" == "${__flag_present}" || "${arg_V}" == "opencoarrays" ]]; then
243
243
echo " ${opencoarrays_version} "
244
244
fi
245
245
246
- elif [[ " ${arg_l} " == " ${__flag_present} " ]]; then
246
+ elif [[ ! -z " ${arg_D :- ${arg_P :- ${arg_U :- ${arg_V} } } } " || " ${arg_l} " == " ${__flag_present} " ]]; then
247
247
248
- " ${opencoarrays_src_dir} " /prerequisites/build.sh -l
248
+ # Delegate to build.sh
249
+ build_arg=${arg_D:- ${arg_P:- ${arg_U:- ${arg_V:- ${arg_p} } } } }
250
+ [ ! -z " ${arg_D} " ] && build_flag=" -D"
251
+ [ ! -z " ${arg_P} " ] && build_flag=" -P"
252
+ [ ! -z " ${arg_U} " ] && build_flag=" -U"
253
+ [ ! -z " ${arg_V} " ] && build_flag=" -V"
254
+ [ " ${arg_l} " == " ${__flag_present} " ] && build_flag=" -l"
255
+ " ${opencoarrays_src_dir} " /prerequisites/build.sh " ${build_flag} " " ${build_arg} "
249
256
250
257
elif [[ ! -z " ${arg_p:- } " && " ${arg_p:- } " != " opencoarrays" ]]; then
251
258
252
- " ${opencoarrays_src_dir} " /prerequisites/build.sh -p " ${arg_p} "
259
+ " ${opencoarrays_src_dir} " /prerequisites/build.sh -p " ${arg_p} "
253
260
254
261
else # Find or install prerequisites and install OpenCoarrays
255
262
0 commit comments