From 3c4a94a1f8144676357fa371262320b7df2de88c Mon Sep 17 00:00:00 2001 From: Terry Chia Date: Sat, 25 Oct 2014 21:03:15 +0800 Subject: Refactor .travis/install.sh. --- .travis/install.sh | 167 ++++++++++++++++++++++++----------------------------- 1 file changed, 76 insertions(+), 91 deletions(-) (limited to '.travis') diff --git a/.travis/install.sh b/.travis/install.sh index af4d8704..242adbda 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -9,110 +9,95 @@ else DARWIN=false fi -if [[ "${OPENSSL}" == "0.9.8" ]]; then - if [[ "$DARWIN" = false ]]; 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 - fi -else - if [[ "$DARWIN" = true ]]; then - brew update - brew upgrade openssl - fi -fi +if [[ "$DARWIN" = true ]]; then + brew update -if [[ "${TOX_ENV}" == "docs" ]]; then - if [[ "$DARWIN" = true ]]; then - brew update - brew install enchant - else - sudo apt-get -y update - sudo apt-get install libenchant-dev - fi -fi + if [[ "${OPENSSL}" == "0.9.8" ]]; then + brew upgrade openssl -if [[ "$DARWIN" = true ]]; then if which pyenv > /dev/null; then - eval "$(pyenv init -)" + eval "$(pyenv init -)" fi case "${TOX_ENV}" in - py26) - curl -O https://bootstrap.pypa.io/get-pip.py - sudo python get-pip.py - sudo pip install virtualenv - ;; - py27) - curl -O https://bootstrap.pypa.io/get-pip.py - sudo python get-pip.py - sudo pip install virtualenv - ;; - pypy) - brew update - brew upgrade pyenv - pyenv install pypy-2.4.0 - pyenv global pypy-2.4.0 - pip install virtualenv - ;; - py32) - brew update - brew upgrade pyenv - pyenv install 3.2.6 - pyenv global 3.2.6 - pip install virtualenv - ;; - py33) - brew update - brew upgrade pyenv - pyenv install 3.3.6 - pyenv global 3.3.6 - pip install virtualenv - ;; - py34) - brew update - brew upgrade pyenv - pyenv install 3.4.2 - pyenv global 3.4.2 - pip install virtualenv - ;; - docs) - curl -O https://bootstrap.pypa.io/get-pip.py - sudo python get-pip.py - sudo pip install virtualenv - ;; + py26) + curl -O https://bootstrap.pypa.io/get-pip.py + sudo python get-pip.py + ;; + py27) + curl -O https://bootstrap.pypa.io/get-pip.py + sudo python get-pip.py + py32) + brew upgrade pyenv + pyenv install 3.2.6 + pyenv global 3.2.6 + ;; + py33) + brew upgrade pyenv + pyenv install 3.3.6 + pyenv global 3.3.6 + ;; + py34) + brew upgrade pyenv + pyenv install 3.4.2 + pyenv global 3.4.2 + ;; + py3pep8) + sudo apt-get install python3.3 python3.3-dev + ;; + pypy) + brew upgrade pyenv + pyenv install pypy-2.4.0 + pyenv global pypy-2.4.0 + ;; + docs) + curl -O https://bootstrap.pypa.io/get-pip.py + sudo python get-pip.py + ;; esac - pyenv rehash + pvenv rehash + else - # add mega-python ppa - sudo add-apt-repository -y ppa:fkrull/deadsnakes - sudo apt-get -y update + sudo add-apt-repository ppa:fkrull/deadsnakes + + if [[ "${TOX_ENV}" == "pypy" ]]; then + sudo add-apt-repository ppa:pypy/ppa + fi + + if [[ "${OPENSSL}" == "0.9.8" ]]; then + sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ lucid main" + + sudo apt-get update + + if [[ "${OPENSSL}" == "0.9.8" ]]; then + sudo apt-get install --force-yes libssl-dev/lucid case "${TOX_ENV}" in - py26) - sudo apt-get install python2.6 python2.6-dev - ;; - py32) - sudo apt-get install python3.2 python3.2-dev - ;; - py33) - sudo apt-get install python3.3 python3.3-dev - ;; - py34) - sudo apt-get install python3.4 python3.4-dev - ;; - py3pep8) - sudo apt-get install python3.3 python3.3-dev - ;; - pypy) - sudo add-apt-repository -y ppa:pypy/ppa - sudo apt-get -y update - sudo apt-get install -y --force-yes pypy pypy-dev - ;; + py26) + sudo apt-get install python2.6 python2.6-dev + ;; + py32) + sudo apt-get install python3.2 python3.2-dev + ;; + py33) + sudo apt-get install python3.3 python3.3-dev + ;; + py34) + sudo apt-get install python3.4 python3.4-dev + ;; + py3pep8) + sudo apt-get install python3.3 python3.3-dev + ;; + pypy) + sudo apt-get install --force-yes pypy pypy-dev + ;; + docs) + sudo apt-get install libenchant-dev + ;; esac - sudo pip install virtualenv fi +sudo pip install virtualenv virtualenv ~/.venv source ~/.venv/bin/activate pip install tox coveralls -- cgit v1.2.3 From bc1e4f6f9f55bb4d5fc3ea987d9bc4cfe5e6966c Mon Sep 17 00:00:00 2001 From: Terry Chia Date: Sun, 26 Oct 2014 10:28:52 +0800 Subject: Fix missing ;; --- .travis/install.sh | 1 + 1 file changed, 1 insertion(+) (limited to '.travis') diff --git a/.travis/install.sh b/.travis/install.sh index 242adbda..47915c49 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -27,6 +27,7 @@ if [[ "$DARWIN" = true ]]; then py27) curl -O https://bootstrap.pypa.io/get-pip.py sudo python get-pip.py + ;; py32) brew upgrade pyenv pyenv install 3.2.6 -- cgit v1.2.3 From 26d3a7c5168599e5e90f53c3dcb0bbf943934dbd Mon Sep 17 00:00:00 2001 From: Terry Chia Date: Sun, 26 Oct 2014 18:40:01 +0800 Subject: Add missing fi. --- .travis/install.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to '.travis') diff --git a/.travis/install.sh b/.travis/install.sh index 47915c49..b392663d 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -14,6 +14,7 @@ if [[ "$DARWIN" = true ]]; then if [[ "${OPENSSL}" == "0.9.8" ]]; then brew upgrade openssl + fi if which pyenv > /dev/null; then eval "$(pyenv init -)" @@ -67,6 +68,7 @@ else if [[ "${OPENSSL}" == "0.9.8" ]]; then sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ lucid main" + fi sudo apt-get update -- cgit v1.2.3 From ff3e7cae306a8833e7f98ea2145d2d928b40a05d Mon Sep 17 00:00:00 2001 From: Terry Chia Date: Sun, 26 Oct 2014 21:10:49 +0800 Subject: I hate bash. --- .travis/install.sh | 1 + 1 file changed, 1 insertion(+) (limited to '.travis') diff --git a/.travis/install.sh b/.travis/install.sh index b392663d..0a2af93b 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -74,6 +74,7 @@ else if [[ "${OPENSSL}" == "0.9.8" ]]; then sudo apt-get install --force-yes libssl-dev/lucid + fi case "${TOX_ENV}" in py26) -- cgit v1.2.3 From da1574970c9620127ccb2df63b518a5d228b9e6b Mon Sep 17 00:00:00 2001 From: Terry Chia Date: Sun, 26 Oct 2014 21:56:21 +0800 Subject: Sooo much typos. --- .travis/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.travis') diff --git a/.travis/install.sh b/.travis/install.sh index 0a2af93b..3f2159de 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -57,7 +57,7 @@ if [[ "$DARWIN" = true ]]; then sudo python get-pip.py ;; esac - pvenv rehash + pyenv rehash else sudo add-apt-repository ppa:fkrull/deadsnakes -- cgit v1.2.3 From 14d8ff58aaff59d13d48e2011835b1defbe4e79b Mon Sep 17 00:00:00 2001 From: Terry Chia Date: Mon, 27 Oct 2014 10:21:20 +0800 Subject: Add -y flags. --- .travis/install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to '.travis') diff --git a/.travis/install.sh b/.travis/install.sh index 3f2159de..0ff3ec73 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -60,20 +60,20 @@ if [[ "$DARWIN" = true ]]; then pyenv rehash else - sudo add-apt-repository ppa:fkrull/deadsnakes + sudo add-apt-repository -y ppa:fkrull/deadsnakes if [[ "${TOX_ENV}" == "pypy" ]]; then - sudo add-apt-repository ppa:pypy/ppa + sudo add-apt-repository -y ppa:pypy/ppa fi if [[ "${OPENSSL}" == "0.9.8" ]]; then - sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ lucid main" + sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ lucid main" fi - sudo apt-get update + sudo apt-get -y update if [[ "${OPENSSL}" == "0.9.8" ]]; then - sudo apt-get install --force-yes libssl-dev/lucid + sudo apt-get install -y --force-yes libssl-dev/lucid fi case "${TOX_ENV}" in -- cgit v1.2.3 From ad32c366487b64e274cb87f1dfc35431e03b7dcf Mon Sep 17 00:00:00 2001 From: Terry Chia Date: Mon, 27 Oct 2014 10:23:32 +0800 Subject: Fix indent. --- .travis/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.travis') diff --git a/.travis/install.sh b/.travis/install.sh index 0ff3ec73..fdb97cf5 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -17,7 +17,7 @@ if [[ "$DARWIN" = true ]]; then fi if which pyenv > /dev/null; then - eval "$(pyenv init -)" + eval "$(pyenv init -)" fi case "${TOX_ENV}" in -- cgit v1.2.3 From 9f38540c7d0018d00305425d61b41cb54e3a560c Mon Sep 17 00:00:00 2001 From: Terry Chia Date: Mon, 27 Oct 2014 10:38:44 +0800 Subject: Make indentation use space instead of tabs. --- .travis/install.sh | 120 ++++++++++++++++++++++++++--------------------------- 1 file changed, 60 insertions(+), 60 deletions(-) (limited to '.travis') diff --git a/.travis/install.sh b/.travis/install.sh index fdb97cf5..7ccae13c 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -13,7 +13,7 @@ if [[ "$DARWIN" = true ]]; then brew update if [[ "${OPENSSL}" == "0.9.8" ]]; then - brew upgrade openssl + brew upgrade openssl fi if which pyenv > /dev/null; then @@ -21,41 +21,41 @@ if [[ "$DARWIN" = true ]]; then fi case "${TOX_ENV}" in - py26) - curl -O https://bootstrap.pypa.io/get-pip.py - sudo python get-pip.py - ;; - py27) - curl -O https://bootstrap.pypa.io/get-pip.py - sudo python get-pip.py - ;; - py32) - brew upgrade pyenv - pyenv install 3.2.6 - pyenv global 3.2.6 - ;; - py33) - brew upgrade pyenv - pyenv install 3.3.6 - pyenv global 3.3.6 - ;; - py34) - brew upgrade pyenv - pyenv install 3.4.2 - pyenv global 3.4.2 - ;; - py3pep8) - sudo apt-get install python3.3 python3.3-dev - ;; - pypy) - brew upgrade pyenv - pyenv install pypy-2.4.0 - pyenv global pypy-2.4.0 - ;; - docs) - curl -O https://bootstrap.pypa.io/get-pip.py - sudo python get-pip.py - ;; + py26) + curl -O https://bootstrap.pypa.io/get-pip.py + sudo python get-pip.py + ;; + py27) + curl -O https://bootstrap.pypa.io/get-pip.py + sudo python get-pip.py + ;; + py32) + brew upgrade pyenv + pyenv install 3.2.6 + pyenv global 3.2.6 + ;; + py33) + brew upgrade pyenv + pyenv install 3.3.6 + pyenv global 3.3.6 + ;; + py34) + brew upgrade pyenv + pyenv install 3.4.2 + pyenv global 3.4.2 + ;; + py3pep8) + sudo apt-get install python3.3 python3.3-dev + ;; + pypy) + brew upgrade pyenv + pyenv install pypy-2.4.0 + pyenv global pypy-2.4.0 + ;; + docs) + curl -O https://bootstrap.pypa.io/get-pip.py + sudo python get-pip.py + ;; esac pyenv rehash @@ -63,41 +63,41 @@ else sudo add-apt-repository -y ppa:fkrull/deadsnakes if [[ "${TOX_ENV}" == "pypy" ]]; then - sudo add-apt-repository -y ppa:pypy/ppa + sudo add-apt-repository -y ppa:pypy/ppa fi if [[ "${OPENSSL}" == "0.9.8" ]]; then - sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ lucid main" + sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ lucid main" fi sudo apt-get -y update if [[ "${OPENSSL}" == "0.9.8" ]]; then - sudo apt-get install -y --force-yes libssl-dev/lucid + sudo apt-get install -y --force-yes libssl-dev/lucid fi case "${TOX_ENV}" in - py26) - sudo apt-get install python2.6 python2.6-dev - ;; - py32) - sudo apt-get install python3.2 python3.2-dev - ;; - py33) - sudo apt-get install python3.3 python3.3-dev - ;; - py34) - sudo apt-get install python3.4 python3.4-dev - ;; - py3pep8) - sudo apt-get install python3.3 python3.3-dev - ;; - pypy) - sudo apt-get install --force-yes pypy pypy-dev - ;; - docs) - sudo apt-get install libenchant-dev - ;; + py26) + sudo apt-get install python2.6 python2.6-dev + ;; + py32) + sudo apt-get install python3.2 python3.2-dev + ;; + py33) + sudo apt-get install python3.3 python3.3-dev + ;; + py34) + sudo apt-get install python3.4 python3.4-dev + ;; + py3pep8) + sudo apt-get install python3.3 python3.3-dev + ;; + pypy) + sudo apt-get install --force-yes pypy pypy-dev + ;; + docs) + sudo apt-get install libenchant-dev + ;; esac fi -- cgit v1.2.3 From f67fcf9f9bc4d18e1ee2291d8e2b4fbe765fe68c Mon Sep 17 00:00:00 2001 From: Terry Chia Date: Wed, 29 Oct 2014 10:52:21 +0800 Subject: I fail at indentation. --- .travis/install.sh | 112 ++++++++++++++++++++++++++--------------------------- 1 file changed, 56 insertions(+), 56 deletions(-) (limited to '.travis') diff --git a/.travis/install.sh b/.travis/install.sh index 7ccae13c..6fa6a639 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -21,41 +21,41 @@ if [[ "$DARWIN" = true ]]; then fi case "${TOX_ENV}" in - py26) - curl -O https://bootstrap.pypa.io/get-pip.py - sudo python get-pip.py - ;; - py27) - curl -O https://bootstrap.pypa.io/get-pip.py - sudo python get-pip.py - ;; - py32) - brew upgrade pyenv - pyenv install 3.2.6 - pyenv global 3.2.6 - ;; - py33) - brew upgrade pyenv - pyenv install 3.3.6 - pyenv global 3.3.6 - ;; - py34) - brew upgrade pyenv - pyenv install 3.4.2 - pyenv global 3.4.2 - ;; - py3pep8) - sudo apt-get install python3.3 python3.3-dev - ;; - pypy) - brew upgrade pyenv - pyenv install pypy-2.4.0 - pyenv global pypy-2.4.0 - ;; - docs) - curl -O https://bootstrap.pypa.io/get-pip.py - sudo python get-pip.py - ;; + py26) + curl -O https://bootstrap.pypa.io/get-pip.py + sudo python get-pip.py + ;; + py27) + curl -O https://bootstrap.pypa.io/get-pip.py + sudo python get-pip.py + ;; + py32) + brew upgrade pyenv + pyenv install 3.2.6 + pyenv global 3.2.6 + ;; + py33) + brew upgrade pyenv + pyenv install 3.3.6 + pyenv global 3.3.6 + ;; + py34) + brew upgrade pyenv + pyenv install 3.4.2 + pyenv global 3.4.2 + ;; + py3pep8) + sudo apt-get install python3.3 python3.3-dev + ;; + pypy) + brew upgrade pyenv + pyenv install pypy-2.4.0 + pyenv global pypy-2.4.0 + ;; + docs) + curl -O https://bootstrap.pypa.io/get-pip.py + sudo python get-pip.py + ;; esac pyenv rehash @@ -77,27 +77,27 @@ else fi case "${TOX_ENV}" in - py26) - sudo apt-get install python2.6 python2.6-dev - ;; - py32) - sudo apt-get install python3.2 python3.2-dev - ;; - py33) - sudo apt-get install python3.3 python3.3-dev - ;; - py34) - sudo apt-get install python3.4 python3.4-dev - ;; - py3pep8) - sudo apt-get install python3.3 python3.3-dev - ;; - pypy) - sudo apt-get install --force-yes pypy pypy-dev - ;; - docs) - sudo apt-get install libenchant-dev - ;; + py26) + sudo apt-get install python2.6 python2.6-dev + ;; + py32) + sudo apt-get install python3.2 python3.2-dev + ;; + py33) + sudo apt-get install python3.3 python3.3-dev + ;; + py34) + sudo apt-get install python3.4 python3.4-dev + ;; + py3pep8) + sudo apt-get install python3.3 python3.3-dev + ;; + pypy) + sudo apt-get install --force-yes pypy pypy-dev + ;; + docs) + sudo apt-get install libenchant-dev + ;; esac fi -- cgit v1.2.3 From c69fa6e6d68ff23cd1be2d8281c74fa46a349fdd Mon Sep 17 00:00:00 2001 From: Terry Chia Date: Thu, 30 Oct 2014 10:37:32 +0800 Subject: Possible logic error. --- .travis/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.travis') diff --git a/.travis/install.sh b/.travis/install.sh index 6fa6a639..51d3097c 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -12,7 +12,7 @@ fi if [[ "$DARWIN" = true ]]; then brew update - if [[ "${OPENSSL}" == "0.9.8" ]]; then + if [[ "${OPENSSL}" != "0.9.8" ]]; then brew upgrade openssl fi -- cgit v1.2.3