From 7af3ed0eec6f07edeb338074b003a00234a616b5 Mon Sep 17 00:00:00 2001 From: Daniele Sluijters Date: Fri, 6 Jun 2014 15:49:42 +0200 Subject: travis: Set variable for Darwin and check that. There were a bunch of `$(uname -s) == 'Darwin'` calls which have now been consolidated into one setting that's being checked everywhere. Additionally one branch was inverted. We were using `if DARWIN; else` everywhere except for in one place where the negated form was used. In order to keep it consistent with the rest of the script the branches have been swapped. --- .travis/install.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.travis/install.sh b/.travis/install.sh index e028033e..1bcb0f54 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -3,21 +3,27 @@ set -e set -x +if [[ "$(uname -s)" == 'Dawin' ]]; then + DARWIN=true +else + DARWIN=false +fi + if [[ "${OPENSSL}" == "0.9.8" ]]; then - if [[ "$(uname -s)" != "Darwin" ]]; then - sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ lucid main" - sudo apt-get -y update - sudo apt-get install -y --force-yes libssl-dev/lucid - else + if [[ "$DARIN" = true ]]; then # travis has openssl installed via brew already, but let's be sure if [[ "$(brew list | grep openssl)" != "openssl" ]]; then brew install openssl fi + else + sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ lucid main" + sudo apt-get -y update + sudo apt-get install -y --force-yes libssl-dev/lucid fi fi if [[ "${TOX_ENV}" == "docs" ]]; then - if [[ "$(uname -s)" == "Darwin" ]]; then + if [[ "$DARWIN" = true ]]; then brew update brew install enchant else @@ -26,7 +32,7 @@ if [[ "${TOX_ENV}" == "docs" ]]; then fi fi -if [[ "$(uname -s)" == "Darwin" ]]; then +if [[ "$DARWIN" = true ]]; then brew update brew install pyenv if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi @@ -102,6 +108,6 @@ virtualenv ~/.venv source ~/.venv/bin/activate pip install tox coveralls -if [[ "$(uname -s)" == "Darwin" ]]; then +if [[ "$DARWIN" = true ]]; then pyenv rehash fi -- cgit v1.2.3 From 2d781b21ff2d7f0f48befc29ae6ca5dbdc2a5245 Mon Sep 17 00:00:00 2001 From: Daniele Sluijters Date: Fri, 6 Jun 2014 15:54:54 +0200 Subject: travis: Forgot a 'W" in DARWIN. --- .travis/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/install.sh b/.travis/install.sh index 1bcb0f54..340571e5 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -10,7 +10,7 @@ else fi if [[ "${OPENSSL}" == "0.9.8" ]]; then - if [[ "$DARIN" = true ]]; then + if [[ "$DARWIN" = true ]]; then # travis has openssl installed via brew already, but let's be sure if [[ "$(brew list | grep openssl)" != "openssl" ]]; then brew install openssl -- cgit v1.2.3 From d1e43838d324a87425201065e0ecbcb8da87d8e1 Mon Sep 17 00:00:00 2001 From: Daniele Sluijters Date: Fri, 6 Jun 2014 16:34:19 +0200 Subject: travis: Typing Darwin is really hard. --- .travis/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/install.sh b/.travis/install.sh index 340571e5..3582ea12 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -3,7 +3,7 @@ set -e set -x -if [[ "$(uname -s)" == 'Dawin' ]]; then +if [[ "$(uname -s)" == 'Darwin' ]]; then DARWIN=true else DARWIN=false -- cgit v1.2.3