Skip to content

Commit 26e9991

Browse files
author
Damian Rouson
committed
Fixes #227
Because the new windows-install.sh uses Ubuntu 16.04, which comes with Windows Subsystem for Linux (WSL), our Windows installer can be tested in Linux image on Travis-CI. Our release notes should indicate the following limitations: 1. The Windows installer builds the default GCC installed by apt-get, which is 5.4.0 for Ubuntu 16.04. 2. Ubuntu 16.04 comes with WSL releases 14936 or later. 3. Updating to 16.04 requires joining the Windows Insider Preview program, selecting "Fast" updates, and running do-release-upgrade.
1 parent 7f0b4ba commit 26e9991

File tree

1 file changed

+23
-26
lines changed

1 file changed

+23
-26
lines changed

windows-install.sh

+23-26
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#/usr/bin/env bash
22
#
33
# windows-install.sh
44
#
@@ -79,8 +79,6 @@
7979
# (3) Parse the usage information (default usage file name: current file's name with -usage appended).
8080
# (4) Parse the command line using the usage information.
8181

82-
starting_directory=${PWD}
83-
8482
### Start of boilerplate -- do not edit this block #######################
8583
export OPENCOARRAYS_SRC_DIR="${OPENCOARRAYS_SRC_DIR:-${PWD%/}}"
8684
if [[ ! -f "${OPENCOARRAYS_SRC_DIR}/src/libcaf.h" ]]; then
@@ -246,34 +244,33 @@ else
246244
sudo apt-get install mpich
247245
fi
248246

249-
# Install OpenCoarrays
250-
251-
252-
set_SUDO_if_needed_to_write_to_install_dir()
253-
{
254-
info "Checking whether the directory ${install_prefix} exists... "
255-
if [[ -d "${install_prefix}" ]]; then
256-
info "yes"
257-
info "Checking whether I have write permissions to ${install_prefix} ... "
258-
if [[ -w "${install_prefix}" ]]; then
247+
set_SUDO_if_needed_to_write_to_install_dir()
248+
{
249+
info "Checking whether the directory ${install_prefix} exists... "
250+
if [[ -d "${install_prefix}" ]]; then
259251
info "yes"
252+
info "Checking whether I have write permissions to ${install_prefix} ... "
253+
if [[ -w "${install_prefix}" ]]; then
254+
info "yes"
255+
else
256+
info "no"
257+
SUDO="sudo"
258+
fi
260259
else
261260
info "no"
262-
SUDO="sudo"
263-
fi
264-
else
265-
info "no"
266-
info "Checking whether I can create ${install_prefix} ... "
267-
if mkdir -p "${install_prefix}" >& /dev/null; then
268-
info "yes."
269-
else
270-
info "no."
271-
SUDO="sudo"
261+
info "Checking whether I can create ${install_prefix} ... "
262+
if mkdir -p "${install_prefix}" >& /dev/null; then
263+
info "yes."
264+
else
265+
info "no."
266+
SUDO="sudo"
267+
fi
272268
fi
273-
fi
274-
}
275-
set_SUDO_if_needed_to_write_to_install_dir
269+
}
270+
set_SUDO_if_needed_to_write_to_install_dir
276271

272+
# Install OpenCoarrays
273+
277274
if [[ -d "$build_path" ]]; then
278275
rm -rf "$build_path"
279276
fi

0 commit comments

Comments
 (0)