@@ -288,19 +288,31 @@ elif [[ ! -z "${arg_D:-${arg_P:-${arg_U:-${arg_V:-${arg_B}}}}}" || "${arg_l}" =
288288 fi
289289
290290elif [[ " ${arg_p:- } " == " opencoarrays" ]]; then
291+
292+ if [[ " ${arg_o} " == " ${__flag_present} " ]]; then
293+
294+ # Download all prerequisites and exit
295+ info " source ${OPENCOARRAYS_SRC_DIR} /prerequisites/install-functions/download-all-prerequisites.sh"
296+ source " ${OPENCOARRAYS_SRC_DIR} /prerequisites/install-functions/download-all-prerequisites.sh"
297+ info " download_all_prerequisites"
298+ download_all_prerequisites
299+
300+ else
301+
302+ # Install OpenCoarrays
303+ cd prerequisites || exit 1
304+ installation_record=install-opencoarrays.log
305+ # shellcheck source=./prerequisites/build-functions/set_SUDO_if_needed_to_write_to_directory.sh
306+ source " ${OPENCOARRAYS_SRC_DIR:- } /prerequisites/build-functions/set_SUDO_if_needed_to_write_to_directory.sh"
307+ version=" $( " ${opencoarrays_src_dir} /install.sh" -V opencoarrays) "
308+ set_SUDO_if_needed_to_write_to_directory " ${install_path} "
291309
292- cd prerequisites || exit 1
293- installation_record=install-opencoarrays.log
294- # shellcheck source=./prerequisites/build-functions/set_SUDO_if_needed_to_write_to_directory.sh
295- source " ${OPENCOARRAYS_SRC_DIR:- } /prerequisites/build-functions/set_SUDO_if_needed_to_write_to_directory.sh"
296- version=" $( " ${opencoarrays_src_dir} /install.sh" -V opencoarrays) "
297- set_SUDO_if_needed_to_write_to_directory " ${install_path} "
298-
299- # Using process substitution "> >(...) -" instead of piping to tee via "2>&1 |" ensures that
300- # report_results gets the FC value set in build_opencoarrays
301- # Source: http://stackoverflow.com/questions/8221227/bash-variable-losing-its-value-strange
302- build_opencoarrays > >( tee ../" ${installation_record} " ) -
303- report_results 2>&1 | tee -a ../" ${installation_record} "
310+ # Using process substitution "> >(...) -" instead of piping to tee via "2>&1 |" ensures that
311+ # report_results gets the FC value set in build_opencoarrays
312+ # Source: http://stackoverflow.com/questions/8221227/bash-variable-losing-its-value-strange
313+ build_opencoarrays > >( tee ../" ${installation_record} " ) -
314+ report_results 2>&1 | tee -a ../" ${installation_record} "
315+ fi
304316
305317elif [[ " ${arg_p:- } " == " ofp" ]]; then
306318
@@ -316,4 +328,3 @@ elif [[ ! -z "${arg_p:-}" ]]; then
316328
317329fi
318330# ____________________________________ End of Main Body ____________________________________________
319-
0 commit comments