-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathinstall.sh
executable file
·66 lines (48 loc) · 1.96 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env bash
function print_green(){
echo -e "\033[32m$1\033[39m"
}
print_green 'pre-requisites installation'
if [[ "$OSTYPE" == "linux-gnu" ]]; then
sudo apt-get update
sudo apt-get install -y openssh-server
sudo apt-get install -y python-dev
sudo apt-get install -y python-pip
sudo apt-get install -y aptitude
sudo apt-get install -y libssl-dev
sudo apt install software-properties-common python-software-properties
sudo -H pip install fabric3
sudo -H pip install git+https://github.com/magnet-cl/fabtools.git
sudo -H pip install --user pipenv
# TODO install pyenv
elif [[ "$OSTYPE" == "darwin"* ]]; then
print_green "Enable remote login on osx"
sudo systemsetup -setremotelogin on
print_green "Check to see if Homebrew is installed, and install it if it is not"
command -v brew >/dev/null 2>&1 || { echo >&2 "Installing Homebrew Now"; \
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"; }
print_green "Installing wget"
brew install wget
print_green "Install pyenv to install python 2.7"
brew install pyenv
print_green "Install pipenv"
brew install pipenv
if [[ -z "${LANG}" ]]; then
print_green "LANG environment varialbe is not set. Required for pipenv"
echo "export LANG=en_US.UTF-8" >> ~/.bash_profile
fi
if [[ -z "${LC_ALL}" ]]; then
print_green "LC_ALL environment varialbe is not set. Required for pipenv"
echo "export LC_ALL=en_US.UTF-8" >> ~/.bash_profile
fi
if [[ -z "${PYENV_ROOT}" ]]; then
print_green "PYENV_ROOT environment varialbe is not set. Required for pipenv"
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
print_green "Also, include pyenv init on bash_profile"
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
fi
source ~/.bash_profile
fi
pipenv install
print_green 'list the available commands'
pipenv run fab -l