Fixed linting error
[EVA-2020-02-2.git] / install.sh
CommitLineData
651e1c20
PH
1#!/bin/bash
2
1b2cabb8
PH
3LIBRARY_VERSION=`cat library/setup.py | grep version | awk -F"'" '{print $2}'`
4LIBRARY_NAME=`cat library/setup.py | grep name | awk -F"'" '{print $2}'`
5
6printf "$LIBRARY_NAME $LIBRARY_VERSION Python Library: Installer\n\n"
651e1c20
PH
7
8if [ $(id -u) -ne 0 ]; then
9 printf "Script must be run as root. Try 'sudo ./install.sh'\n"
10 exit 1
11fi
12
13cd library
14
15printf "Installing for Python 2..\n"
16python setup.py install
17
18if [ -f "/usr/bin/python3" ]; then
19 printf "Installing for Python 3..\n"
20 python3 setup.py install
21fi
22
23cd ..
24
25printf "Done!\n"