2 ##############################################################################
3 # Copyright (c) 2016 ZTE Corporation.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
12 BASE_WORK_DIR=$(cd $(dirname $0) && pwd)
14 OPNFV_REPO_DIR=${1:-""}
16 # start syslog for loghander
17 service rsyslog restart && echo "syslog start successfully"
19 # install requirements for parser
20 if [ -n "${OPNFV_REPO_DIR}" ]; then
21 echo " OPNFV repository directory is ${OPNFV_REPO_DIR}"
22 pip install -r ${OPNFV_REPO_DIR}/parser/tosca2heat/tosca-parser/requirements.txt
23 pip install -r ${OPNFV_REPO_DIR}/parser/tosca2heat/heat-translator/requirements.txt
25 echo "No input for OPNFV repository directory, will use local directory"
26 pip install -r ${BASE_WORK_DIR}/../tosca2heat/tosca-parser/requirements.txt
27 pip install -r ${BASE_WORK_DIR}/../tosca2heat/heat-translator/requirements.txt
30 # uninstall other tosca-parser and heat-translator for parser
31 pip uninstall -y tosca-parser
32 pip uninstall -y heat-translator
35 if [ -n "${OPNFV_REPO_DIR}" ]; then
36 cd ${OPNFV_REPO_DIR}/parser/tosca2heat/heat-translator && python setup.py install
37 cd ${OPNFV_REPO_DIR}/parser/tosca2heat/tosca-parser && python setup.py install
39 cd ${BASE_WORK_DIR}/../tosca2heat/heat-translator && python setup.py install
40 cd ${BASE_WORK_DIR}/../tosca2heat/tosca-parser && python setup.py install