diff options
author | Daniele Sluijters <github@daenney.net> | 2014-06-06 15:49:42 +0200 |
---|---|---|
committer | Daniele Sluijters <github@daenney.net> | 2014-06-06 15:49:42 +0200 |
commit | 7af3ed0eec6f07edeb338074b003a00234a616b5 (patch) | |
tree | 01ed80828a7b3aec39557b4722c4f2564bef1cf7 /.travis | |
parent | a7abb4bec5a06f2d1d6cd896b2f362cd79c4d5a3 (diff) | |
download | cryptography-7af3ed0eec6f07edeb338074b003a00234a616b5.tar.gz cryptography-7af3ed0eec6f07edeb338074b003a00234a616b5.tar.bz2 cryptography-7af3ed0eec6f07edeb338074b003a00234a616b5.zip |
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.
Diffstat (limited to '.travis')
-rwxr-xr-x | .travis/install.sh | 22 |
1 files 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 |