diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2017-01-03 14:57:54 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-01-03 14:57:54 +0000 |
commit | 0520eae9676a06946dee8545d8cae61f80648ce2 (patch) | |
tree | 96f68cc615b3f3ae9bb8169ab7ba577765f68523 /utils | |
parent | 064c445f9910a7dabbc262fa1a0de8543409ca6c (diff) | |
parent | a80275e17d9da07fcd67af4237c0276c0f685296 (diff) |
Merge "Fix installation of testapi in virtualenv"
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/test/testapi/install.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/utils/test/testapi/install.sh b/utils/test/testapi/install.sh index 43229eabb..c55691aed 100755 --- a/utils/test/testapi/install.sh +++ b/utils/test/testapi/install.sh @@ -10,9 +10,17 @@ usage: where: -h|--help show this help text" -if [[ $(whoami) != "root" ]]; then - echo "Error: This script must be run as root!" - exit 1 +# Ref :- https://openstack.nimeyo.com/87286/openstack-packaging-all-definition-data-files-config-setup + +if [ -z "$VIRTUAL_ENV" ]; +then + if [[ $(whoami) != "root" ]]; + then + echo "Error: This script must be run as root!" + exit 1 + fi +else + sed -i -e 's#/etc/opnfv_testapi =#etc/opnfv_testapi =#g' setup.cfg fi cp -fr 3rd_party/static opnfv_testapi/tornado_swagger |