Skip to content

Commit 1248508

Browse files
committed
Fix csh/tcsh set calls in setup.csh
- Fix #607 - Fix #584
1 parent 003efcb commit 1248508

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

prerequisites/install-functions/report_results.sh

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ report_results()
3434
# Prepend the OpenCoarrays license to the setup.sh script:
3535
while IFS='' read -r line || [[ -n "${line}" ]]; do
3636
echo "# ${line}" >> setup.sh
37-
done < "${opencoarrays_src_dir}/LICENSE"
37+
done < "${OpenCoarrays_src_dir}/LICENSE"
3838
while IFS='' read -r line || [[ -n "${line}" ]]; do
3939
echo "# ${line}" >> setup.csh
4040
done < "${opencoarrays_src_dir}/LICENSE"
@@ -49,18 +49,18 @@ report_results()
4949
echo "else " >> setup.sh
5050
echo " if ! [[ \"\${PATH}\" =~ \"${cmake_install_path}\" ]] ; then " >> setup.sh
5151
echo " export PATH=\"${cmake_install_path%/}\":\${PATH} " >> setup.sh
52-
echo " fi " >> setup.sh
52+
echo " fi " >> setup.sh
5353
echo "fi " >> setup.sh
54-
echo "set path = (\"${cmake_install_path%/}\" \"\$path\") " >> setup.csh
54+
echo "set path = (\"${cmake_install_path%/}\" \$path) " >> setup.csh
5555
fi
5656
if [[ -x "${fully_qualified_FC}" ]]; then
5757
echo "# Prepend the compiler path to the PATH environment variable:" | tee -a setup.sh setup.csh
58-
echo "if [[ -z \"\${PATH}\" ]]; then " >> setup.sh
58+
echo "if [[ -z \"\${PATH}\" ]]; then " >> setup.sh
5959
echo " export PATH=\"${compiler_install_root%/}/bin\" " >> setup.sh
6060
echo "else " >> setup.sh
61-
echo " export PATH=\"${compiler_install_root%/}/bin:\${PATH}\" " >> setup.sh
61+
echo " export PATH=\"${compiler_install_root%/}/bin:\${PATH}\" " >> setup.sh
6262
echo "fi " >> setup.sh
63-
echo "set path = (\"${compiler_install_root%/}\"/bin \"\$path\") " >> setup.csh
63+
echo "set path (\"${compiler_install_root%/}\"/bin \$path) " >> setup.csh
6464
fi
6565
LD_LIB_P_VAR=LD_LIBRARY_PATH
6666
if [[ "${OSTYPE:-}" =~ [Dd]arwin ]]; then
@@ -74,23 +74,23 @@ report_results()
7474
echo "else " >> setup.sh
7575
echo " export ${LD_LIB_P_VAR}=\"${compiler_lib_paths%/}:\${!LD_LIB_P_VAR}\" " >> setup.sh
7676
echo "fi " >> setup.sh
77-
echo "set LD_LIBRARY_PATH = (\"${compiler_lib_paths%/}\" \"\${LD_LIBRARY_PATH}\") " >> setup.csh
77+
echo "setenv LD_LIBRARY_PATH \"${compiler_lib_paths%/}:\${LD_LIBRARY_PATH}\" " >> setup.csh
7878
fi
79-
echo " " >> setup.sh
79+
echo " " >> setup.sh
8080
if [[ -x "${mpi_install_root}/bin/mpifort" ]]; then
8181
echo "# Prepend the MPI path to the PATH environment variable:" | tee -a setup.sh setup.csh
82-
echo "if [[ -z \"\${PATH}\" ]]; then " >> setup.sh
83-
echo " export PATH=\"${mpi_install_root%/}/bin\" " >> setup.sh
82+
echo "if [[ -z \"\${PATH}\" ]]; then " >> setup.sh
83+
echo " export PATH=\"${mpi_install_root%/}/bin\" " >> setup.sh
8484
echo "else " >> setup.sh
8585
echo " export PATH=\"${mpi_install_root%/}/bin\":\${PATH} " >> setup.sh
8686
echo "fi " >> setup.sh
87-
echo "set path = (\"${mpi_install_root%/}\"/bin \"\$path\") " >> setup.csh
87+
echo "set path = (\"${mpi_install_root%/}/bin\" \$path) " >> setup.csh
8888
fi
8989
# In all likelihood, the following paths are only needed if OpenCoarrays built them,
9090
# In by far the most common such use case, they would have been built in a recursive
9191
# build of all the OpenCoarrays dependency tree (rather than built indvidually via
9292
# ./install --package) so we only need check the default location in which OpenCoarrays
93-
# would install them. If they are not there, then it is very likely the case that the
93+
# would install them. If they are not there, then it is very likely the case that the
9494
# the system versions of these packages are present and in the user's path or that the
9595
# user doesn't need them at all (e.g. there was no need to build gfortran from source).
9696
flex_install_path=$("${build_script}" -P flex)
@@ -100,7 +100,7 @@ report_results()
100100
echo " export PATH=\"${flex_install_path}/bin\" " >> setup.sh
101101
echo "else " >> setup.sh
102102
echo " export PATH=\"${flex_install_path}/bin\":\${PATH} " >> setup.sh
103-
echo "set path = (\"$flex_install_path\"/bin \"\$path\") " >> setup.csh
103+
echo "set path = (\"$flex_install_path\"/bin \$path) " >> setup.csh
104104
echo "fi " >> setup.sh
105105
fi
106106
bison_install_path=$("${build_script}" -P bison)
@@ -111,7 +111,7 @@ report_results()
111111
echo "else " >> setup.sh
112112
echo " export PATH=\"${bison_install_path}/bin\":\${PATH} " >> setup.sh
113113
echo "fi " >> setup.sh
114-
echo "set path = (\"$bison_install_path\"/bin \"\$path\") " >> setup.csh
114+
echo "set path = (\"$bison_install_path\"/bin \$path) " >> setup.csh
115115
fi
116116
m4_install_path=$("${build_script}" -P m4)
117117
if [[ -x "${m4_install_path}/bin/m4" ]]; then
@@ -121,7 +121,7 @@ report_results()
121121
echo "else " >> setup.sh
122122
echo " export PATH=\"${m4_install_path}/bin\":\${PATH} " >> setup.sh
123123
echo "fi " >> setup.sh
124-
echo "set path = (\"$m4_install_path\"/bin \"\$path\") " >> setup.csh
124+
echo "set path = (\"$m4_install_path\"/bin \$path) " >> setup.csh
125125
fi
126126
opencoarrays_install_path="${install_path}"
127127
if [[ -x "${opencoarrays_install_path}/bin/caf" ]]; then
@@ -131,7 +131,7 @@ report_results()
131131
echo "else " >> setup.sh
132132
echo " export PATH=\"${opencoarrays_install_path%/}/bin\":\${PATH} " >> setup.sh
133133
echo "fi " >> setup.sh
134-
echo "set path = (\"${opencoarrays_install_path%/}\"/bin \"\$path\") " >> setup.csh
134+
echo "set path = (\"${opencoarrays_install_path%/}\"/bin \$path) " >> setup.csh
135135
fi
136136
if ${SUDO:-} mv setup.sh "${opencoarrays_install_path}"; then
137137
setup_sh_location=${opencoarrays_install_path}

0 commit comments

Comments
 (0)