-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·53 lines (47 loc) · 1.43 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
#! /bin/bash
#
# This script installs *everything required for operation* where possible
# Including libraries, and system dependencies
#
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
function debian_linux() {
echo '
!
! You need to enter your password! What you type won\'t be shown
!'
sudo apt-get update
sudo apt-get install -qy python-pip python-dev build-essential
sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv
}
function osx() {
# Check and install pip if it's not here already
if hash pip 2>/dev/null; then
sudo pip install virtualenv
else
# Check if Homebrew is installed, otherwise install it now
if hash brew 2>/dev/null; then
brew install pip
else
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install pip
fi
fi
}
if ! hash virtualenv 2>/dev/null; then
# Check for lsb_release binary, which would indicate a linux system
if hash lsb_release 2>/dev/null; then
distrobution="$(lsb_release -i | cut -d: -f2 | tr -d '\t' | tr -d ' ')"
if [ "Debian Ubuntu" == *"$distrobution"* ]; then
debian_linux
else
echo "I don't know how to install myself on your system. Best of luck!"
fi
else
osx
fi
fi
cd "$DIR"
virtualenv env
source env/bin/activate
pip install -r requirements.txt