blob: fce51be975a58fdc7727f79319d46c3b7f8e5da4 [file] [log] [blame]
Scott Baker50421662016-06-27 22:09:48 -07001UBUNTU:=$(shell which apt > /dev/null 2>&1; echo $$?)
2
3ifeq ($(UBUNTU),0)
4
5# ******************* apt-based distros ***************************
6prereqs: /usr/bin/http docker /usr/bin/curl /usr/local/bin/docker-compose
7
8/usr/bin/http:
9 sudo apt-get -y install httpie
10
11/usr/bin/curl:
12 sudo apt-get -y install curl
13
14docker:
15 which docker > /dev/null || wget -qO- https://get.docker.com/ | sh
16 sudo usermod -aG docker $(shell whoami)
17
18else
19
20# ****************** RPM-based distros ******************
21
22# (untested / work-in-progress)
23
24prereqs: /usr/bin/pip /usr/bin/http docker /usr/local/bin/docker-compose
25
26/usr/bin/pip:
27 curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
28 sudo python ./get-pip.py
29
30docker:
31 which docker > /dev/null || wget -qO- https://get.docker.com/ | sh
32 sudo usermod -aG docker $(shell whoami)
33
34/usr/bin/http:
35 sudo pip install httpie
36
37endif
38
39/usr/local/bin/docker-compose:
40 sudo bash -c "curl -L https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
41 sudo chmod +x /usr/local/bin/docker-compose