Skip to content

Commit 1107976

Browse files
author
Damian Rouson
committed
block non-Linux installation windows-install.sh
windows-install.sh is intended for use in the Windows Subsystem for Linux Ubuntu 16.04 bash shell.
1 parent b0f5e53 commit 1107976

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

windows-install.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ function cleanup_before_exit () {
108108
}
109109
trap cleanup_before_exit EXIT # The signal is specified here. Could be SIGINT, SIGTERM etc.
110110

111-
112111
### Validation (decide what's required for running your script and error out)
113112
#####################################################################
114113

@@ -145,7 +144,6 @@ info "-v (--version): ${arg_v}"
145144
info "-V (--version-number): ${arg_V}"
146145
}
147146

148-
149147
# __________ Process command-line arguments and environment variables _____________
150148

151149
export this_script="$(basename "$0")"
@@ -174,6 +172,9 @@ export CMAKE="${arg_m:-cmake}"
174172

175173
verify_this_is_ubuntu()
176174
{
175+
if [[ ${__os} != "Linux" ]]; then
176+
emergency "${__os} not supported: this script is intended for use in Windows Subsystem for Linux "
177+
fi
177178
linux_standard_base_i=`lsb_release -i`
178179
untrimmed_name=${linux_standard_base_i##*Distributor ID:}
179180
linux_distribution="${untrimmed_name//[[:space:]]/}"
@@ -205,10 +206,6 @@ verify_acceptable_release_number()
205206
}
206207
verify_acceptable_release_number
207208

208-
export FC=${arg_f:-gfortran}
209-
export CC=${arg_f:-gcc}
210-
export CXX=${arg_f:-g++}
211-
212209
if [[ "${arg_V}" == "${__flag_present}" ]]; then
213210
# Print just the version number
214211
info "$opencoarrays_version"
@@ -228,6 +225,10 @@ elif [[ "${arg_v}" == "${__flag_present}" ]]; then
228225
info "http://www.sourceryinstitute.org/license.html"
229226
info ""
230227
else
228+
229+
export FC=${arg_f:-gfortran}
230+
export CC=${arg_c:-gcc}
231+
export CXX=${arg_C:-g++}
231232

232233
# Check for and, if necessary, install OpenCoarrays prerequisites
233234

@@ -255,8 +256,8 @@ else
255256
mkdir -p "$build_path"
256257
cd "$build_path"
257258
info "Configuring OpenCoarrays with the following command:"
258-
info "\"$CMAKE\" \"$OPENCOARRAYS_SRC_DIR\" -DCMAKE_INSTALL_PREFIX=\"$install_prefix\""
259-
"$CMAKE" "$OPENCOARRAYS_SRC_DIR" -DCMAKE_INSTALL_PREFIX="$install_prefix"
259+
info "FC=\"$FC\" CC=\"$CC\" \"$CMAKE\" \"$OPENCOARRAYS_SRC_DIR\" -DCMAKE_INSTALL_PREFIX=\"$install_prefix\""
260+
FC="$FC" CC="$CC" "$CMAKE" "$OPENCOARRAYS_SRC_DIR" -DCMAKE_INSTALL_PREFIX="$install_prefix"
260261
info "Building OpenCoarrays with the following command:"
261262
info "make -j $arg_j"
262263
make -j $arg_j

0 commit comments

Comments
 (0)