Skip to content

Commit 4d755f0

Browse files
author
Damian Rouson
committed
Add dev branch build: ./install.sh -p gcc -b trunk
1 parent 9ed6fbf commit 4d755f0

File tree

4 files changed

+22
-17
lines changed

4 files changed

+22
-17
lines changed

install.sh

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -113,22 +113,25 @@ trap cleanup_before_exit EXIT # The signal is specified here. Could be SIGINT, S
113113
[ -z "${LOG_LEVEL:-}" ] && emergency "Cannot continue without LOG_LEVEL. "
114114

115115
# 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
117117
print_debug_only=7
118118
if [ "$(( LOG_LEVEL < print_debug_only ))" -ne 0 ]; then
119119
debug "Supressing info and debug messages: one of {-l, -v, -P, -U, -V, -D} present."
120120
suppress_info_debug_messages
121121
fi
122122
fi
123123

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]"
126126

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]"
129129

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]"
132135

133136
### Print bootstrapped magic variables to STDERR when LOG_LEVEL
134137
### is at the default value (6) or above.
@@ -142,6 +145,8 @@ info "__os: ${__os}"
142145
info "__usage: ${__usage}"
143146
info "LOG_LEVEL: ${LOG_LEVEL}"
144147

148+
info "-b (--install-branch): ${arg_b}"
149+
info "-B (--list-branches): ${arg_B}"
145150
info "-c (--with-c): ${arg_c}"
146151
info "-C (--with-cxx): ${arg_C}"
147152
info "-d (--debug): ${arg_d}"
@@ -231,7 +236,6 @@ source $opencoarrays_src_dir/prerequisites/install-functions/report_results.sh
231236

232237
# ________________________________ Start of the Main Body ___________________________________
233238

234-
235239
if [[ "${arg_v}" == "${__flag_present}" || "${arg_V}" == "opencoarrays" ]]; then
236240

237241
# Print script copyright if invoked with -v, -V, or --version argument
@@ -255,10 +259,11 @@ if [[ "${arg_v}" == "${__flag_present}" || "${arg_V}" == "opencoarrays" ]]; then
255259
echo "${opencoarrays_version//[[:space:]]/}"
256260
fi
257261

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
259263

260264
# 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"
262267
[ ! -z "${arg_D}" ] && build_flag="-D"
263268
[ ! -z "${arg_P}" ] && build_flag="-P"
264269
[ ! -z "${arg_U}" ] && build_flag="-U"
@@ -284,7 +289,6 @@ elif [[ ! -z "${arg_D:-${arg_P:-${arg_U:-${arg_V}}}}" || "${arg_l}" == "${__fla
284289
fi
285290

286291
elif [[ "${arg_p:-}" == "opencoarrays" ]]; then
287-
288292

289293
cd prerequisites || exit 1
290294
installation_record=install-opencoarrays.log

install.sh-usage

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
-b --branch [arg] Install the specified repository development branch.
2+
-B --list-branches [arg] List the available branches in the specified package's repository.
13
-c --with-c [arg] Use specified C compiler.
24
-C --with-cxx [arg] Use specified C++ compiler.
35
-d --debug Enable debug mode.

prerequisites/build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ trap cleanup_before_exit EXIT # The signal is specified here. Could be SIGINT, S
5959
export __flag_present=1
6060

6161
# shellcheck disable=SC2154
62-
if [[ "${arg_l}" != "${__flag_present}" && "${arg_L}" != "${__flag_present}" &&
63-
"${arg_v}" != "${__flag_present}" && "${arg_h}" != "${__flag_present}" &&
62+
if [[ "${arg_l}" != "${__flag_present}" &&
63+
"${arg_v}" != "${__flag_present}" &&
64+
"${arg_h}" != "${__flag_present}" &&
6465
-z "${arg_D:-${arg_p:-${arg_P:-${arg_U:-${arg_V:-${arg_B}}}}}}" ]]; then
6566
help "${__base}: Insufficient arguments. Please pass either -B, -D, -h, -l, -L, -p, -P, -U, -v, -V, or a longer equivalent."
6667
fi
@@ -100,7 +101,6 @@ info "-i (--install-prefix): ${arg_i} "
100101
info "-j (--num-threads): ${arg_j} "
101102
info "-I (--install-version): ${arg_I} "
102103
info "-l (--list-packages): ${arg_l} "
103-
info "-L (--list-branches): ${arg_L} "
104104
info "-m (--with-cmake): ${arg_m} "
105105
info "-M (--with-mpi): ${arg_M} "
106106
info "-n (--no-color): ${arg_n} "

prerequisites/build.sh-usage

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
-b --branch [arg] Install the specified repository development branch.
2-
-B --list-branches [arg] List the available branches in the specified package's repository. (currently only arg=gcc is supported)
1+
-b --install-branch [arg] Install the specified repository development branch.
2+
-B --list-branches [arg] List the available branches in the specified package's repository.
33
-c --with-c [arg] Use the specified C compiler. Default="gcc"
44
-C --with-cxx [arg] Use the specified C++ compiler. Default="g++"
55
-d --debug Enable debug mode.
@@ -11,7 +11,6 @@
1111
-j --num-threads [arg] Number of threads to use when invoking make. Default="1"
1212
-I --install-version [arg] Package version to install. (To see default, use -V or --print-version)
1313
-l --list-packages List the packages this script can install.
14-
-L --list-branches List the repository branches this script can download.
1514
-m --with-cmake [arg] Use the specified CMake installation. Default="cmake"
1615
-M --with-mpi [arg] Use the specified MPI installation.
1716
-n --no-color Disable color output.

0 commit comments

Comments
 (0)