1
0
forked from VimPlug/jedi

A new version of the travis install script

This commit is contained in:
Dave Halter
2018-01-02 16:33:05 +01:00
parent 9c5ce5a8d2
commit b2b8607bd6

View File

@@ -1,12 +1,34 @@
#! /usr/bin/env bash
set -e
echo "ENV" $JEDI_TEST_ENVIRONMENT
PYTHON=python-3.3
if [[ $JEDI_TEST_ENVIRONMENT == "33" ]]; then
VERSION=3.3
DOWNLOAD=1
fi
if [[ $JEDI_TEST_ENVIRONMENT == "35" ]]; then
VERSION=3.5
DOWNLOAD=1
fi
if [[ $JEDI_TEST_ENVIRONMENT == "36" ]]; then
VERSION=3.6
fi
if [[ -z $VERSION ]]; then
echo "Environments should already be installed"
exit 0
fi
PYTHON=python-$VERSION
# Check if the desired Python version already exists.
$PYTHON --version && exit 0 || true
# Otherwise download and install.
wget https://s3.amazonaws.com/travis-python-archives/binaries/ubuntu/14.04/x86_64/$PYTHON.tar.bz2
sudo tar xjf $PYTHON.tar.bz2 --directory /
python3.3 --version
ls /usr/bin
if [[ -z $DOWNLOAD ]]; then
# Otherwise download and install.
DOWNLOAD_NAME=python-$VERSION
wget https://s3.amazonaws.com/travis-python-archives/binaries/ubuntu/14.04/x86_64/$DOWNLOAD_NAME.tar.bz2
sudo tar xjf $DOWNLOAD_NAME.tar.bz2 --directory /
fi
# Need to add the path in the end.
export PATH=$PATH:/opt/python/$VERSION/bin