@@ -42,6 +42,7 @@ if [[ ! -f "${B3B_USE_CASE:-}/bootstrap.sh" ]]; then
42
42
echo " Please set B3B_USE_CASE to the bash3boilerplate use-case directory path."
43
43
exit 2
44
44
fi
45
+ # shellcheck source=./use-case/bootstrap.sh
45
46
source " ${B3B_USE_CASE} /bootstrap.sh" " $@ "
46
47
47
48
# 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
53
54
54
55
export __flag_present=1
55
56
56
- # Verify requirements
57
+ # Verify requirements
57
58
58
59
[ -z " ${LOG_LEVEL:- } " ] && emergency " Cannot continue without LOG_LEVEL. "
59
60
61
+ # shellcheck disable=SC2154
60
62
if [[ " ${__os} " != " OSX" ]]; then
61
63
info " ${__base} currently installs binaries that work only on OS X"
62
64
emergency " To request other platforms, please submit an issue at http://github.com/sourceryinstitute/opencoarrays/issues"
63
65
fi
64
66
65
67
default_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.
67
69
# Then exit with normal status.
70
+ # shellcheck disable=SC2154
68
71
if [[ " ${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) "
70
73
echo " ofp-sdf default downloader: ${default_ofp_downloader} "
71
74
exit 0
72
75
fi
73
76
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.
75
78
# Then exit with normal status.
76
79
default_ofp_install_path=" ${OPENCOARRAYS_SRC_DIR} /prerequisites/installations"
77
80
install_path=" ${arg_i:- " ${default_ofp_install_path} " } "
78
81
strategoxt_superbundle_install_path=" /opt"
82
+ # shellcheck disable=SC2154
79
83
if [[ " ${arg_P} " == " ${__flag_present} " ]]; then
80
84
echo " strategoxt-superbundle default installation path: ${strategoxt_superbundle_install_path} "
81
85
echo " ofp default installation path: ${default_ofp_install_path} "
82
86
exit 0
83
87
fi
84
88
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.
86
90
# Then exit with normal status.
87
91
default_ofp_version=sdf
92
+ # shellcheck disable=SC2154
88
93
if [[ " ${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) "
90
95
echo " ofp default version: ${default_ofp_version} "
91
96
exit 0
92
97
fi
93
98
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.
95
100
# Then exit with normal status.
96
101
ofp_URL=" https://github.com/sourceryinstitute/opencoarrays/files/213108/ofp-sdf.tar.gz"
102
+ # shellcheck disable=SC2154
97
103
if [[ " ${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) "
99
105
echo " ofp URL: ${ofp_URL} "
100
106
exit 0
101
107
fi
102
108
103
- # ## Print bootstrapped magic variables to STDERR when LOG_LEVEL
109
+ # ## Print bootstrapped magic variables to STDERR when LOG_LEVEL
104
110
# ## is at the default value (6) or above.
105
111
# ####################################################################
106
-
112
+ # shellcheck disable=SC2154
113
+ {
107
114
info " __file: ${__file} "
108
115
info " __dir: ${__dir} "
109
116
info " __base: ${__base} "
@@ -122,7 +129,7 @@ info "-n (--no-color): ${arg_n}"
122
129
info " -P (--print-path): ${arg_P} "
123
130
info " -U (--print-url): ${arg_U} "
124
131
info " -V (--print-version): ${arg_V} "
125
-
132
+ }
126
133
# Set OFP installation path to the value of the -i argument if present.
127
134
# Otherwise, install OFP in the OpenCoarrays prerequisites/installations directory.
128
135
opencoarrays_prerequisites_dir=" ${OPENCOARRAYS_SRC_DIR} " /prerequisites/
135
142
ofp_prereqs_install_dir=" /opt"
136
143
# Change present working directory to installation directory
137
144
if [[ ! -d " ${install_path} " ]]; then
145
+ # shellcheck source=./build-functions/set_SUDO_if_needed_to_write_to_directory.sh
138
146
source " ${opencoarrays_prerequisites_dir} /build-functions/set_SUDO_if_needed_to_write_to_directory.sh"
139
147
set_SUDO_if_needed_to_write_to_directory " ${install_path} "
140
148
${SUDO:- } mkdir -p " ${install_path} "
@@ -153,6 +161,7 @@ export SDF2_PATH="${ofp_prereqs_install_dir}"/sdf2-bundle/v2.4/bin
153
161
export ST_PATH=" ${ofp_prereqs_install_dir} " /strategoxt/v0.17/bin
154
162
export DYLD_LIBRARY_PATH=" ${ofp_prereqs_install_dir} " /strategoxt/v0.17/lib:/opt/aterm/v2.5/lib
155
163
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
157
166
source " ${opencoarrays_prerequisites_dir} " /install-binary-functions/build_parse_table.sh
158
167
build_parse_table
0 commit comments