move over configurations from xos repo
Change-Id: I66583bdaea582986d8f16a29066a79c6687b97fb
diff --git a/common/Makefile.prereqs b/common/Makefile.prereqs
new file mode 100644
index 0000000..fce51be
--- /dev/null
+++ b/common/Makefile.prereqs
@@ -0,0 +1,41 @@
+UBUNTU:=$(shell which apt > /dev/null 2>&1; echo $$?)
+
+ifeq ($(UBUNTU),0)
+
+# ******************* apt-based distros ***************************
+prereqs: /usr/bin/http docker /usr/bin/curl /usr/local/bin/docker-compose
+
+/usr/bin/http:
+ sudo apt-get -y install httpie
+
+/usr/bin/curl:
+ sudo apt-get -y install curl
+
+docker:
+ which docker > /dev/null || wget -qO- https://get.docker.com/ | sh
+ sudo usermod -aG docker $(shell whoami)
+
+else
+
+# ****************** RPM-based distros ******************
+
+# (untested / work-in-progress)
+
+prereqs: /usr/bin/pip /usr/bin/http docker /usr/local/bin/docker-compose
+
+/usr/bin/pip:
+ curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
+ sudo python ./get-pip.py
+
+docker:
+ which docker > /dev/null || wget -qO- https://get.docker.com/ | sh
+ sudo usermod -aG docker $(shell whoami)
+
+/usr/bin/http:
+ sudo pip install httpie
+
+endif
+
+/usr/local/bin/docker-compose:
+ 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"
+ sudo chmod +x /usr/local/bin/docker-compose