bugfix: copy hosts file
[bottlenecks.git] / pre_virt_env.sh
1 #!/bin/bash
2
3 ##############################################################################
4 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
11
12 # Install Python virtual enviroment
13 sudo -H  pip install virtualenv
14
15 # Create virtual enviroment
16 virtualenv venv
17
18 # Activate and login the virtual enviroment
19 . venv/bin/activate
20
21 # Install Bottlencks CLI
22 pip install --editable .
23
24 if [ -z $VIRTUAL_ENV ]; then
25     echo "Virtual enviroment is incorrectly configured!"
26     deactivate
27 fi