@@ -42,6 +42,7 @@ if [[ ! -f "${B3B_USE_CASE:-}/bootstrap.sh" ]]; then
4242 echo " Please set B3B_USE_CASE to the bash3boilerplate use-case directory path."
4343 exit 2
4444fi
45+ # shellcheck source=./use-case/bootstrap.sh
4546source " ${B3B_USE_CASE} /bootstrap.sh" " $@ "
4647
4748# Set up a function to call when receiving an EXIT signal to do some cleanup. Remove if
@@ -53,57 +54,63 @@ trap cleanup_before_exit EXIT # The signal is specified here. Could be SIGINT, S
5354
5455export __flag_present=1
5556
56- # Verify requirements
57+ # Verify requirements
5758
5859[ -z " ${LOG_LEVEL:- } " ] && emergency " Cannot continue without LOG_LEVEL. "
5960
61+ # shellcheck disable=SC2154
6062if [[ " ${__os} " != " OSX" ]]; then
6163 info " ${__base} currently installs binaries that work only on OS X"
6264 emergency " To request other platforms, please submit an issue at http://github.com/sourceryinstitute/opencoarrays/issues"
6365fi
6466
6567default_ofp_downloader=wget
66- # If -D is passed, print the download programs used for OFP and its prerequisites.
68+ # If -D is passed, print the download programs used for OFP and its prerequisites.
6769# Then exit with normal status.
70+ # shellcheck disable=SC2154
6871if [[ " ${arg_D} " == " ${__flag_present} " ]]; then
69- echo " strategoxt-superbundle downloader: ` $ {OPENCOARRAYS_SRC_DIR} /prerequisites/install-binary.sh -D strategoxt-superbundle` "
72+ echo " strategoxt-superbundle downloader: $( " $ {OPENCOARRAYS_SRC_DIR} /prerequisites/install-binary.sh" -D strategoxt-superbundle) "
7073 echo " ofp-sdf default downloader: ${default_ofp_downloader} "
7174 exit 0
7275fi
7376
74- # If -P is passed, print the default installation paths for OFP and its prerequisites.
77+ # If -P is passed, print the default installation paths for OFP and its prerequisites.
7578# Then exit with normal status.
7679default_ofp_install_path=" ${OPENCOARRAYS_SRC_DIR} /prerequisites/installations"
7780install_path=" ${arg_i:- " ${default_ofp_install_path} " } "
7881strategoxt_superbundle_install_path=" /opt"
82+ # shellcheck disable=SC2154
7983if [[ " ${arg_P} " == " ${__flag_present} " ]]; then
8084 echo " strategoxt-superbundle default installation path: ${strategoxt_superbundle_install_path} "
8185 echo " ofp default installation path: ${default_ofp_install_path} "
8286 exit 0
8387fi
8488
85- # If -V is passed, print the default versions of OFP and its prerequisites.
89+ # If -V is passed, print the default versions of OFP and its prerequisites.
8690# Then exit with normal status.
8791default_ofp_version=sdf
92+ # shellcheck disable=SC2154
8893if [[ " ${arg_V} " == " ${__flag_present} " ]]; then
89- echo " strategoxt-superbundle default version: ` $ {OPENCOARRAYS_SRC_DIR} /prerequisites/install-binary.sh -V strategoxt-superbundle` "
94+ echo " strategoxt-superbundle default version: $( " $ {OPENCOARRAYS_SRC_DIR} /prerequisites/install-binary.sh" -V strategoxt-superbundle) "
9095 echo " ofp default version: ${default_ofp_version} "
9196 exit 0
9297fi
9398
94- # If -U is passed, print the URLs for OFP and its prerequisites.
99+ # If -U is passed, print the URLs for OFP and its prerequisites.
95100# Then exit with normal status.
96101ofp_URL=" https://github.com/sourceryinstitute/opencoarrays/files/213108/ofp-sdf.tar.gz"
102+ # shellcheck disable=SC2154
97103if [[ " ${arg_U} " == " ${__flag_present} " ]]; then
98- echo " strategoxt-superbundle URL: ` $ {OPENCOARRAYS_SRC_DIR} /prerequisites/install-binary.sh -U strategoxt-superbundle` "
104+ echo " strategoxt-superbundle URL: $( " $ {OPENCOARRAYS_SRC_DIR} /prerequisites/install-binary.sh" -U strategoxt-superbundle) "
99105 echo " ofp URL: ${ofp_URL} "
100106 exit 0
101107fi
102108
103- # ## Print bootstrapped magic variables to STDERR when LOG_LEVEL
109+ # ## Print bootstrapped magic variables to STDERR when LOG_LEVEL
104110# ## is at the default value (6) or above.
105111# ####################################################################
106-
112+ # shellcheck disable=SC2154
113+ {
107114info " __file: ${__file} "
108115info " __dir: ${__dir} "
109116info " __base: ${__base} "
@@ -122,7 +129,7 @@ info "-n (--no-color): ${arg_n}"
122129info " -P (--print-path): ${arg_P} "
123130info " -U (--print-url): ${arg_U} "
124131info " -V (--print-version): ${arg_V} "
125-
132+ }
126133# Set OFP installation path to the value of the -i argument if present.
127134# Otherwise, install OFP in the OpenCoarrays prerequisites/installations directory.
128135opencoarrays_prerequisites_dir=" ${OPENCOARRAYS_SRC_DIR} " /prerequisites/
135142ofp_prereqs_install_dir=" /opt"
136143# Change present working directory to installation directory
137144if [[ ! -d " ${install_path} " ]]; then
145+ # shellcheck source=./build-functions/set_SUDO_if_needed_to_write_to_directory.sh
138146 source " ${opencoarrays_prerequisites_dir} /build-functions/set_SUDO_if_needed_to_write_to_directory.sh"
139147 set_SUDO_if_needed_to_write_to_directory " ${install_path} "
140148 ${SUDO:- } mkdir -p " ${install_path} "
@@ -153,6 +161,7 @@ export SDF2_PATH="${ofp_prereqs_install_dir}"/sdf2-bundle/v2.4/bin
153161export ST_PATH=" ${ofp_prereqs_install_dir} " /strategoxt/v0.17/bin
154162export DYLD_LIBRARY_PATH=" ${ofp_prereqs_install_dir} " /strategoxt/v0.17/lib:/opt/aterm/v2.5/lib
155163
156- OFP_HOME=" ${install_path} " /ofp-sdf
164+ export OFP_HOME=" ${install_path} " /ofp-sdf
165+ # shellcheck source=./install-binary-functions/build_parse_table.sh
157166source " ${opencoarrays_prerequisites_dir} " /install-binary-functions/build_parse_table.sh
158167build_parse_table
0 commit comments