forked from redhat-performance/satperf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
executable file
·33 lines (27 loc) · 982 Bytes
/
setup
File metadata and controls
executable file
·33 lines (27 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# export ANSIBLE_CONFIG=$PWD/conf/ansible.cfg
# echo "..exported env var: ANSIBLE_CONFIG."
deps=(gcc python-devel openssl-devel libffi-devel)
if [[ -f /etc/redhat-release ]]; then
echo "..checking installation requirements."
check_vars=$(rpm -q ${deps[@]} | grep 'not installed')
if [[ ! -z $check_vars ]]; then
echo -e "\nOne of the following RPMs are missing:"
echo ${deps[@]}
echo -e "\nPlease install the above mentioned packages and run this script again!\n"
else
if [[ ! -d venv/ ]]; then
echo "default venv/ folder not found."
echo -e "\nFirst, Run:"
echo "1) virtualenv venv -p python2"
fi
echo -e "\nNext, run:"
echo "1) source venv/bin/activate"
echo "2) pip install -r requirements.txt"
echo
fi
else
echo -e "..unable to detect a Red Hat installation\n\nPlease install the equivalent of:"
echo ${deps[@]}
echo
fi