From 26e99919fe732576f7277a0e1b83f43cc7c9d749 Mon Sep 17 00:00:00 2001 From: Damian Rouson Date: Thu, 19 Jan 2017 00:03:02 -0800 Subject: [PATCH] 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. --- windows-install.sh | 49 ++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/windows-install.sh b/windows-install.sh index 861c7d948..1ee1c8732 100755 --- a/windows-install.sh +++ b/windows-install.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#/usr/bin/env bash # # windows-install.sh # @@ -79,8 +79,6 @@ # (3) Parse the usage information (default usage file name: current file's name with -usage appended). # (4) Parse the command line using the usage information. -starting_directory=${PWD} - ### Start of boilerplate -- do not edit this block ####################### export OPENCOARRAYS_SRC_DIR="${OPENCOARRAYS_SRC_DIR:-${PWD%/}}" if [[ ! -f "${OPENCOARRAYS_SRC_DIR}/src/libcaf.h" ]]; then @@ -246,34 +244,33 @@ else sudo apt-get install mpich fi - # Install OpenCoarrays - - -set_SUDO_if_needed_to_write_to_install_dir() -{ - info "Checking whether the directory ${install_prefix} exists... " - if [[ -d "${install_prefix}" ]]; then - info "yes" - info "Checking whether I have write permissions to ${install_prefix} ... " - if [[ -w "${install_prefix}" ]]; then + set_SUDO_if_needed_to_write_to_install_dir() + { + info "Checking whether the directory ${install_prefix} exists... " + if [[ -d "${install_prefix}" ]]; then info "yes" + info "Checking whether I have write permissions to ${install_prefix} ... " + if [[ -w "${install_prefix}" ]]; then + info "yes" + else + info "no" + SUDO="sudo" + fi else info "no" - SUDO="sudo" - fi - else - info "no" - info "Checking whether I can create ${install_prefix} ... " - if mkdir -p "${install_prefix}" >& /dev/null; then - info "yes." - else - info "no." - SUDO="sudo" + info "Checking whether I can create ${install_prefix} ... " + if mkdir -p "${install_prefix}" >& /dev/null; then + info "yes." + else + info "no." + SUDO="sudo" + fi fi - fi -} -set_SUDO_if_needed_to_write_to_install_dir + } + set_SUDO_if_needed_to_write_to_install_dir + # Install OpenCoarrays + if [[ -d "$build_path" ]]; then rm -rf "$build_path" fi