@@ -4,7 +4,7 @@ report_results()
44 fully_qualified_FC=" $( type -P " ${FC} " ) "
55 if [[ ${fully_qualified_FC} != * gfortran* ]]; then
66 emergency " report_results.sh: non-gfortran compiler: \$ {fully_qualified_FC}=${fully_qualified_FC} "
7- fi
7+ fi
88 # Set path_to_FC fully-qualified gfortran location
99 compiler_install_root=" ${fully_qualified_FC% bin/ gfortran* } "
1010
@@ -32,51 +32,51 @@ report_results()
3232 ${SUDO:- } rm setup.csh
3333 fi
3434 # Prepend the OpenCoarrays license to the setup.sh script:
35- while IFS=' ' read -r line || [[ -n " $line " ]]; do
36- echo " # $line " >> setup.sh
35+ while IFS=' ' read -r line || [[ -n " ${ line} " ]]; do
36+ echo " # ${ line} " >> setup.sh
3737 done < " ${opencoarrays_src_dir} /LICENSE"
38- while IFS=' ' read -r line || [[ -n " $line " ]]; do
39- echo " # $line " >> setup.csh
38+ while IFS=' ' read -r line || [[ -n " ${ line} " ]]; do
39+ echo " # ${ line} " >> setup.csh
4040 done < " ${opencoarrays_src_dir} /LICENSE"
4141 echo " # " | tee -a setup.csh setup.sh
4242 echo " # Execute this script via the following command: " | tee -a setup.csh setup.sh
4343 echo " # source ${install_path%/ } /setup.sh " | tee -a setup.csh setup.sh
4444 echo " " | tee -a setup.csh setup.sh
45- if [[ -x " $cmake_install_path /cmake" ]]; then
45+ if [[ -x " ${ cmake_install_path} /cmake" ]]; then
4646 echo " # Prepend the CMake path to the PATH environment variable:" | tee -a setup.sh setup.csh
47- echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
47+ echo " if [[ -z \"\$ { PATH} \" ]]; then " >> setup.sh
4848 echo " export PATH=\" ${cmake_install_path%/ } /\" " >> setup.sh
4949 echo " else " >> setup.sh
50- echo " export PATH=\" ${cmake_install_path%/ } /\" :\$ PATH " >> setup.sh
50+ echo " export PATH=\" ${cmake_install_path%/ } /\" :\$ { PATH} " >> setup.sh
5151 echo " fi " >> setup.sh
5252 echo " set path = (\" ${cmake_install_path%/ } \" /\"\$ path\" ) " >> setup.csh
5353 fi
54- if [[ -x " $fully_qualified_FC " ]]; then
54+ if [[ -x " ${ fully_qualified_FC} " ]]; then
5555 echo " # Prepend the compiler path to the PATH environment variable:" | tee -a setup.sh setup.csh
56- echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
56+ echo " if [[ -z \"\$ { PATH} \" ]]; then " >> setup.sh
5757 echo " export PATH=\" ${compiler_install_root%/ } /bin\" " >> setup.sh
5858 echo " else " >> setup.sh
59- echo " export PATH=\" ${compiler_install_root%/ } /bin:\$ PATH\" " >> setup.sh
59+ echo " export PATH=\" ${compiler_install_root%/ } /bin:\$ { PATH} \" " >> setup.sh
6060 echo " fi " >> setup.sh
6161 echo " set path = (\" ${compiler_install_root%/ } \" /bin \"\$ path\" ) " >> setup.csh
6262 fi
6363 if [[ -d " ${compiler_install_root%/ } /lib" || -d " ${compiler_install_root%/ } /lib64" ]]; then
6464 echo " # Prepend the compiler library paths to the LD_LIBRARY_PATH environment variable:" | tee -a setup.sh setup.csh
6565 compiler_lib_paths=" ${compiler_install_root%/ } /lib64/:${compiler_install_root%/ } /lib"
66- echo " if [[ -z \"\$ LD_LIBRARY_PATH\" ]]; then " >> setup.sh
66+ echo " if [[ -z \"\$ { LD_LIBRARY_PATH} \" ]]; then " >> setup.sh
6767 echo " export LD_LIBRARY_PATH=\" ${compiler_lib_paths%/ } \" " >> setup.sh
6868 echo " else " >> setup.sh
69- echo " export LD_LIBRARY_PATH=\" ${compiler_lib_paths%/ } :\$ LD_LIBRARY_PATH\" " >> setup.sh
69+ echo " export LD_LIBRARY_PATH=\" ${compiler_lib_paths%/ } :\$ { LD_LIBRARY_PATH} \" " >> setup.sh
7070 echo " fi " >> setup.sh
7171 echo " set LD_LIBRARY_PATH = (\" ${compiler_lib_paths%/ } \" /bin \"\$ LD_LIBRARY_PATH\" ) " >> setup.csh
7272 fi
7373 echo " " >> setup.sh
74- if [[ -x " $mpi_install_root /bin/mpif90" ]]; then
74+ if [[ -x " ${ mpi_install_root} /bin/mpif90" ]]; then
7575 echo " # Prepend the MPI path to the PATH environment variable:" | tee -a setup.sh setup.csh
76- echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
76+ echo " if [[ -z \"\$ { PATH} \" ]]; then " >> setup.sh
7777 echo " export PATH=\" ${mpi_install_root%/ } /bin\" " >> setup.sh
7878 echo " else " >> setup.sh
79- echo " export PATH=\" ${mpi_install_root%/ } /bin\" :\$ PATH " >> setup.sh
79+ echo " export PATH=\" ${mpi_install_root%/ } /bin\" :\$ { PATH} " >> setup.sh
8080 echo " fi " >> setup.sh
8181 echo " set path = (\" ${mpi_install_root%/ } \" /bin \"\$ path\" ) " >> setup.csh
8282 fi
@@ -88,52 +88,52 @@ report_results()
8888 # the system versions of these packages are present and in the user's path or that the
8989 # user doesn't need them at all (e.g. there was no need to build gfortran from source).
9090 flex_install_path=$( " ${build_script} " -P flex)
91- if [[ -x " $flex_install_path /bin/flex" ]]; then
91+ if [[ -x " ${ flex_install_path} /bin/flex" ]]; then
9292 echo " # Prepend the flex path to the PATH environment variable:" | tee -a setup.sh setup.csh
93- echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
94- echo " export PATH=\" $flex_install_path /bin\" " >> setup.sh
93+ echo " if [[ -z \"\$ { PATH} \" ]]; then " >> setup.sh
94+ echo " export PATH=\" ${ flex_install_path} /bin\" " >> setup.sh
9595 echo " else " >> setup.sh
96- echo " export PATH=\" $flex_install_path /bin\" :\$ PATH " >> setup.sh
96+ echo " export PATH=\" ${ flex_install_path} /bin\" :\$ { PATH} " >> setup.sh
9797 echo " set path = (\" $flex_install_path \" /bin \"\$ path\" ) " >> setup.csh
9898 echo " fi " >> setup.sh
9999 fi
100100 bison_install_path=$( " ${build_script} " -P bison)
101- if [[ -x " $bison_install_path /bin/yacc" ]]; then
101+ if [[ -x " ${ bison_install_path} /bin/yacc" ]]; then
102102 echo " # Prepend the bison path to the PATH environment variable:" | tee -a setup.sh setup.csh
103- echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
104- echo " export PATH=\" $bison_install_path /bin\" " >> setup.sh
103+ echo " if [[ -z \"\$ { PATH} \" ]]; then " >> setup.sh
104+ echo " export PATH=\" ${ bison_install_path} /bin\" " >> setup.sh
105105 echo " else " >> setup.sh
106- echo " export PATH=\" $bison_install_path /bin\" :\$ PATH " >> setup.sh
106+ echo " export PATH=\" ${ bison_install_path} /bin\" :\$ { PATH} " >> setup.sh
107107 echo " fi " >> setup.sh
108108 echo " set path = (\" $bison_install_path \" /bin \"\$ path\" ) " >> setup.csh
109109 fi
110110 m4_install_path=$( " ${build_script} " -P m4)
111- if [[ -x " $m4_install_path /bin/m4" ]]; then
111+ if [[ -x " ${ m4_install_path} /bin/m4" ]]; then
112112 echo " # Prepend the m4 path to the PATH environment variable:" | tee -a setup.sh setup.csh
113- echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
114- echo " export PATH=\" $m4_install_path /bin\" " >> setup.sh
113+ echo " if [[ -z \"\$ { PATH} \" ]]; then " >> setup.sh
114+ echo " export PATH=\" ${ m4_install_path} /bin\" " >> setup.sh
115115 echo " else " >> setup.sh
116- echo " export PATH=\" $m4_install_path /bin\" :\$ PATH " >> setup.sh
116+ echo " export PATH=\" ${ m4_install_path} /bin\" :\$ { PATH} " >> setup.sh
117117 echo " fi " >> setup.sh
118118 echo " set path = (\" $m4_install_path \" /bin \"\$ path\" ) " >> setup.csh
119119 fi
120120 opencoarrays_install_path=" ${install_path} "
121- if [[ -x " $opencoarrays_install_path /bin/caf" ]]; then
121+ if [[ -x " ${ opencoarrays_install_path} /bin/caf" ]]; then
122122 echo " # Prepend the OpenCoarrays path to the PATH environment variable:" | tee -a setup.sh setup.csh
123- echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
123+ echo " if [[ -z \"\$ { PATH} \" ]]; then " >> setup.sh
124124 echo " export PATH=\" ${opencoarrays_install_path%/ } /bin\" " >> setup.sh
125125 echo " else " >> setup.sh
126- echo " export PATH=\" ${opencoarrays_install_path%/ } /bin\" :\$ PATH " >> setup.sh
126+ echo " export PATH=\" ${opencoarrays_install_path%/ } /bin\" :\$ { PATH} " >> setup.sh
127127 echo " fi " >> setup.sh
128128 echo " set path = (\" ${opencoarrays_install_path%/ } \" /bin \"\$ path\" ) " >> setup.csh
129129 fi
130- if ${SUDO:- } mv setup.sh " $opencoarrays_install_path " ; then
131- setup_sh_location=$opencoarrays_install_path
130+ if ${SUDO:- } mv setup.sh " ${ opencoarrays_install_path} " ; then
131+ setup_sh_location=${ opencoarrays_install_path}
132132 else
133133 setup_sh_location=${PWD}
134134 fi
135- if ${SUDO:- } mv setup.csh " $opencoarrays_install_path " ; then
136- setup_csh_location=$opencoarrays_install_path
135+ if ${SUDO:- } mv setup.csh " ${ opencoarrays_install_path} " ; then
136+ setup_csh_location=${ opencoarrays_install_path}
137137 else
138138 setup_csh_location=${PWD}
139139 fi
@@ -153,10 +153,10 @@ report_results()
153153 echo " OpenCoarrays compiler wrapper (caf), program launcher (cafrun), or prerequisite"
154154 echo " package installer (build), or these programs are not in the following, expected"
155155 echo " location:"
156- echo " $install_path /bin."
156+ echo " ${ install_path} /bin."
157157 echo " Please review the following file for more information:"
158- echo " $install_path / $ installation_record"
159- echo " and submit an bug report at https://github.com/sourceryinstitute/opencoarrays/issues"
158+ echo " ${ install_path} / ${ installation_record} "
159+ echo " and submit an bug report at https://github.com/sourceryinstitute/opencoarrays/issues/new "
160160 echo " [exit 100]"
161161 exit 100
162162
0 commit comments