Skip to content

Commit 489e080

Browse files
author
Damian Rouson
committed
installer detect Windows/invoke windows-install.sh
1 parent d649a2f commit 489e080

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

install.sh

+12-5
Original file line numberDiff line numberDiff line change
@@ -310,18 +310,25 @@ elif [[ "${arg_p:-}" == "opencoarrays" ]]; then
310310
# Install Xcode command line tools (CLT) if on macOS and if needed
311311
maybe_install_xcodeCLT
312312
# Install OpenCoarrays
313+
313314
cd prerequisites || exit 1
314315
installation_record=install-opencoarrays.log
315316
# shellcheck source=./prerequisites/build-functions/set_SUDO_if_needed_to_write_to_directory.sh
316317
source "${OPENCOARRAYS_SRC_DIR:-}/prerequisites/build-functions/set_SUDO_if_needed_to_write_to_directory.sh"
317318
version="$("${opencoarrays_src_dir}/install.sh" -V opencoarrays)"
318319
set_SUDO_if_needed_to_write_to_directory "${install_path}"
319320

320-
# Using process substitution "> >(...) -" instead of piping to tee via "2>&1 |" ensures that
321-
# report_results gets the FC value set in build_opencoarrays
322-
# Source: http://stackoverflow.com/questions/8221227/bash-variable-losing-its-value-strange
323-
build_opencoarrays > >( tee ../"${installation_record}" ) -
324-
report_results 2>&1 | tee -a ../"${installation_record}"
321+
if grep -s -q Microsoft /proc/version ; then
322+
info "Windows Subsystem for Linux detected. Invoking windows-install.sh with the following command:"
323+
info "\"${opencoarrays_src_dir}\"/prerequisites/install-functions/windows-install.sh \"$@\""
324+
"${opencoarrays_src_dir}"/prerequisites/install-functions/windows-install.sh "$@"
325+
else
326+
# Using process substitution "> >(...) -" instead of piping to tee via "2>&1 |" ensures that
327+
# report_results gets the FC value set in build_opencoarrays
328+
# Source: http://stackoverflow.com/questions/8221227/bash-variable-losing-its-value-strange
329+
build_opencoarrays > >( tee ../"${installation_record}" ) -
330+
report_results 2>&1 | tee -a ../"${installation_record}"
331+
fi
325332
fi
326333

327334
elif [[ "${arg_p:-}" == "ofp" ]]; then

0 commit comments

Comments
 (0)