blob: f3a87b1b8f40a286e30e0c21aa55f2e8acf5045e [file] [log] [blame]
koder aka kdanilov8fbb27f2015-07-17 22:23:31 +03001#!/bin/bash
2
3FULL="$1"
4
koder aka kdanilov5ea9df02015-12-04 21:46:06 +02005pushd $(dirname "$0") > /dev/null
6SCRIPTPATH=$(pwd -P)
7popd > /dev/null
8
koder aka kdanilov8fbb27f2015-07-17 22:23:31 +03009function install_apt() {
kdanylov aka koder150b2192017-04-01 16:53:01 +030010 apt-get install -y python-openssl python-pip
koder aka kdanilov8fbb27f2015-07-17 22:23:31 +030011}
12
koder aka kdanilov8fbb27f2015-07-17 22:23:31 +030013function install_yum() {
kdanylov aka koder150b2192017-04-01 16:53:01 +030014 yum -y install pyOpenSSL python-pip python-ecdsa
koder aka kdanilov8fbb27f2015-07-17 22:23:31 +030015}
16
17if which apt-get >/dev/null; then
18 install_apt
19else
20 if which yum >/dev/null; then
21 install_yum
22 else
koder aka kdanilov3d2bc4f2016-11-12 18:31:18 +020023 echo "Error: Neither apt-get, not yum installed. Can't install binary dependencies."
koder aka kdanilov8fbb27f2015-07-17 22:23:31 +030024 exit 1
25 fi
26fi
27
koder aka kdanilov5ea9df02015-12-04 21:46:06 +020028pip install -r "$SCRIPTPATH/../requirements.txt"
koder aka kdanilov8fbb27f2015-07-17 22:23:31 +030029
30if [ "$FULL" == "--full" ] ; then
koder aka kdanilov3d2bc4f2016-11-12 18:31:18 +020031 pip install -r "$SCRIPTPATH/../requirements_extra.txt"
koder aka kdanilov8fbb27f2015-07-17 22:23:31 +030032fi