bugfix: copy hosts file
[bottlenecks.git] / rm_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 CLI_BASE="/home/opnfv/bottlenecks/"
13
14 # Logout the virtual enviroment
15 if [ ! -z ${VIRTUAL_ENV} ]; then
16     deactivate
17 fi
18
19 # Delete the virtual enviroment
20 rm -rf $CLI_BASE/venv/
21
22 # Delete CLI python package
23 if [ -d $CLI_BASE/bottlenecks.egg-info ]; then
24     rm -rf $CLI_BASE/bottlenecks.egg-info
25 fi
26
27 if [ -f $CLI_BASE/cli/bottlenecks_cli.pyc ]; then
28     rm -f $CLI_BASE/cli/bottlenecks_cli.pyc
29 fi
30
31 if [ -f $CLI_BASE/cli/__init__.pyc ]; then
32     rm -f $CLI_BASE/cli/__init__.pyc
33 fi
34
35 if [ -f $CLI_BASE/cli/command_group/testcase.pyc ]; then
36     rm -f $CLI_BASE/cli/command_group/testcase.pyc
37 fi
38
39 if [ -f $CLI_BASE/cli/command_group/__init__.pyc ]; then
40     rm -f $CLI_BASE/cli/command_group/__init__.pyc
41 fi
42
43 # Delete SSH key
44 if [ -d $CLI_BASE/utils/infra_setup/bottlenecks_key/ ]; then
45     rm -rf $CLI_BASE/utils/infra_setup/bottlenecks_key/
46 fi