233e8dfbe293941bc5acdb590578e1048ae57363
[csit.git] / resources / tools / presentation / run_cpta.sh
1 #!/bin/bash
2
3 set +x
4
5 # set default values in config array
6 typeset -A DIR
7
8 DIR[WORKING]=_tmp
9
10 # Install system dependencies
11 sudo apt-get -y update
12 sudo apt-get -y install libxml2 libxml2-dev libxslt-dev build-essential \
13     zlib1g-dev unzip
14
15 # Clean-up when finished
16 trap 'rm -rf ${DIR[WORKING]}; exit' EXIT
17 trap 'rm -rf ${DIR[WORKING]}; exit' ERR
18
19 # Create working directories
20 mkdir ${DIR[WORKING]}
21
22 # Create virtual environment
23 virtualenv ${DIR[WORKING]}/env
24 . ${DIR[WORKING]}/env/bin/activate
25
26 # Install python dependencies:
27 pip install -r requirements.txt
28
29 export PYTHONPATH=`pwd`
30
31 python pal.py \
32     --specification specification_CPTA.yaml \
33     --logging INFO \
34     --force
35
36 RETURN_STATUS=$(echo $?)
37 exit ${RETURN_STATUS}

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.