Skip to content

Commit 3163e15

Browse files
author
Damian Rouson
committed
Fixes #356. Clean up to prep for merge into master
macOS testing of this branch is complete. Unless any issues are identified on other OS's, this will be the final commit on branch before merging. This commit eliminates trailing white space and deleteds unused files.
1 parent b9ff62f commit 3163e15

File tree

4 files changed

+16
-145
lines changed

4 files changed

+16
-145
lines changed

developer-scripts/patched-trunk-install.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ function set_absolute_path()
2929
}
3030
set_absolute_path "${patch_file}"
3131

32-
# Exit on error or use of an unset variable:
32+
# Exit on error or use of an unset variable:
3333
set -o errexit
3434
set -o nounset
3535

3636
# Return the highest exit code in a chain of pipes:
3737
set -o pipefail
3838

39-
### Define functions
39+
### Define functions
4040
function choose_package_manager()
4141
{
4242
OS=$(uname)
@@ -48,7 +48,7 @@ function choose_package_manager()
4848
elif type brew >& /dev/null; then
4949
package_manager="brew"
5050
fi
51-
;;
51+
;;
5252

5353
"Linux" )
5454
if [[ ! -f /etc/lsb-release ]]; then
@@ -64,17 +64,17 @@ function choose_package_manager()
6464
"Debian" )
6565
package_manager="dnf"
6666
;;
67-
*)
67+
*)
6868
echo "I don't recognize the Linux distribution ${DISTRIB_ID:-}"
6969
exit 1
7070
;;
7171
esac
72-
;;
72+
;;
7373

74-
*)
74+
*)
7575
echo "I don't recognize the operating system \${OS}"
7676
exit 1
77-
;;
77+
;;
7878
esac
7979
}
8080
choose_package_manager
@@ -121,22 +121,22 @@ install_if_missing flex
121121

122122
# Download and build the GCC trunk:
123123
echo "Downloading the GCC trunk."
124-
./install.sh --only-download --package gcc --install-branch trunk
124+
./install.sh --only-download --package gcc --install-branch trunk
125125

126126
# Patch the GCC trunk and rebuild
127127
echo "Patching the GCC source using ${absolute_path}."
128-
pushd prerequisites/downloads/trunk
128+
pushd prerequisites/downloads/trunk
129129
patch -p0 < "${absolute_path}"
130130
popd
131131

132132
# Build the patched GCC trunk
133133
echo "Rebuilding the patched GCC source."
134-
./install.sh --package gcc --install-branch trunk --yes-to-all
134+
./install.sh --package gcc --install-branch trunk --yes-to-all
135135

136136
# Verify that GCC installed in the expected path
137137
patched_GCC_install_path=${PWD}/prerequisites/installations/gcc/trunk
138138
if ! type "${patched_GCC_install_path}"/bin/gfortran >& /dev/null; then
139-
echo "gfortran is not installed in the expected location ${patched_GCC_install_path}."
139+
echo "gfortran is not installed in the expected location ${patched_GCC_install_path}."
140140
exit 1
141141
fi
142142

@@ -146,7 +146,7 @@ echo "Setting and exporting LD_LIBRARY_PATH"
146146
function prepend_to_LD_LIBRARY_PATH() {
147147
: ${1?'set_LD_LIBRARY_PATH: missing path'}
148148
new_path="${1}"
149-
if [[ -z "${LD_LIBRARY_PATH:-}" ]]; then
149+
if [[ -z "${LD_LIBRARY_PATH:-}" ]]; then
150150
export LD_LIBRARY_PATH="${new_path}"
151151
else
152152
export LD_LIBRARY_PATH="${new_path}:${LD_LIBRARY_PATH}"
@@ -155,7 +155,7 @@ function prepend_to_LD_LIBRARY_PATH() {
155155

156156
old_path="${LD_LIBRARY_PATH:-}"
157157

158-
if [[ -d "${PWD}/prerequisites/installations/gcc/trunk/lib" ]]; then
158+
if [[ -d "${PWD}/prerequisites/installations/gcc/trunk/lib" ]]; then
159159
prepend_to_LD_LIBRARY_PATH "${patched_GCC_install_path}/lib/"
160160
fi
161161

@@ -175,12 +175,12 @@ echo "Building MPICH with the patched compilers."
175175
./install.sh --package mpich --yes-to-all \
176176
--with-fortran "${patched_GCC_install_path}/bin/gfortran" \
177177
--with-c "${patched_GCC_install_path}/bin/gcc" \
178-
--with-cxx "${patched_GCC_install_path}/bin/g++"
178+
--with-cxx "${patched_GCC_install_path}/bin/g++"
179179

180180
# Verify that MPICH installed where expected
181181
mpich_install_path=$(./install.sh -P mpich)
182182
if ! type "${mpich_install_path}"/bin/mpif90; then
183-
echo "MPICH is not installed in the expected location ${mpich_install_path}."
183+
echo "MPICH is not installed in the expected location ${mpich_install_path}."
184184
exit 1
185185
fi
186186

prerequisites/download-all.sh

Lines changed: 0 additions & 106 deletions
This file was deleted.

prerequisites/download-all.sh-usage

Lines changed: 0 additions & 23 deletions
This file was deleted.

prerequisites/install-functions/download-all-prerequisites.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function download_all_prerequisites()
44

55
download_list=( "m4" "bison" "flex" "mpich" "cmake" )
66

7-
for package_to_download in "${download_list[@]}" ;
7+
for package_to_download in "${download_list[@]}" ;
88
do
99
./install.sh --package ${package_to_download} --only-download
1010
done

0 commit comments

Comments
 (0)