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