koder aka kdanilov | 8fbb27f | 2015-07-17 22:23:31 +0300 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | FULL="$1" |
| 4 | |
koder aka kdanilov | 5ea9df0 | 2015-12-04 21:46:06 +0200 | [diff] [blame] | 5 | pushd $(dirname "$0") > /dev/null |
| 6 | SCRIPTPATH=$(pwd -P) |
| 7 | popd > /dev/null |
| 8 | |
koder aka kdanilov | 8fbb27f | 2015-07-17 22:23:31 +0300 | [diff] [blame] | 9 | function install_apt() { |
kdanylov aka koder | 150b219 | 2017-04-01 16:53:01 +0300 | [diff] [blame] | 10 | apt-get install -y python-openssl python-pip |
koder aka kdanilov | 8fbb27f | 2015-07-17 22:23:31 +0300 | [diff] [blame] | 11 | } |
| 12 | |
koder aka kdanilov | 8fbb27f | 2015-07-17 22:23:31 +0300 | [diff] [blame] | 13 | function install_yum() { |
kdanylov aka koder | 150b219 | 2017-04-01 16:53:01 +0300 | [diff] [blame] | 14 | yum -y install pyOpenSSL python-pip python-ecdsa |
koder aka kdanilov | 8fbb27f | 2015-07-17 22:23:31 +0300 | [diff] [blame] | 15 | } |
| 16 | |
| 17 | if which apt-get >/dev/null; then |
| 18 | install_apt |
| 19 | else |
| 20 | if which yum >/dev/null; then |
| 21 | install_yum |
| 22 | else |
koder aka kdanilov | 3d2bc4f | 2016-11-12 18:31:18 +0200 | [diff] [blame] | 23 | echo "Error: Neither apt-get, not yum installed. Can't install binary dependencies." |
koder aka kdanilov | 8fbb27f | 2015-07-17 22:23:31 +0300 | [diff] [blame] | 24 | exit 1 |
| 25 | fi |
| 26 | fi |
| 27 | |
koder aka kdanilov | 5ea9df0 | 2015-12-04 21:46:06 +0200 | [diff] [blame] | 28 | pip install -r "$SCRIPTPATH/../requirements.txt" |
koder aka kdanilov | 8fbb27f | 2015-07-17 22:23:31 +0300 | [diff] [blame] | 29 | |
| 30 | if [ "$FULL" == "--full" ] ; then |
koder aka kdanilov | 3d2bc4f | 2016-11-12 18:31:18 +0200 | [diff] [blame] | 31 | pip install -r "$SCRIPTPATH/../requirements_extra.txt" |
koder aka kdanilov | 8fbb27f | 2015-07-17 22:23:31 +0300 | [diff] [blame] | 32 | fi |