@@ -29,14 +29,14 @@ function set_absolute_path()
2929}
3030set_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:
3333set -o errexit
3434set -o nounset
3535
3636# Return the highest exit code in a chain of pipes:
3737set -o pipefail
3838
39- # ## Define functions
39+ # ## Define functions
4040function 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}
8080choose_package_manager
@@ -121,22 +121,22 @@ install_if_missing flex
121121
122122# Download and build the GCC trunk:
123123echo " 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
127127echo " Patching the GCC source using ${absolute_path} ."
128- pushd prerequisites/downloads/trunk
128+ pushd prerequisites/downloads/trunk
129129 patch -p0 < " ${absolute_path} "
130130popd
131131
132132# Build the patched GCC trunk
133133echo " 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
137137patched_GCC_install_path=${PWD} /prerequisites/installations/gcc/trunk
138138if ! 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
141141fi
142142
@@ -146,7 +146,7 @@ echo "Setting and exporting LD_LIBRARY_PATH"
146146function 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
156156old_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/"
160160fi
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
181181mpich_install_path=$( ./install.sh -P mpich)
182182if ! 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
185185fi
186186
0 commit comments