PAL: download - ignore verifying the SSL certificate
[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 # Create working directories
16 mkdir ${DIR[WORKING]}
17
18 # Create virtual environment
19 virtualenv -p $(which python3) ${DIR[WORKING]}/env
20 source ${DIR[WORKING]}/env/bin/activate
21
22 # FIXME: Temporary hack until all docker dns will be solved
23 echo "nameserver 172.17.0.1" > /etc/resolv.conf
24
25 # Install python dependencies:
26 pip3 install -r requirements.txt
27
28 export PYTHONPATH=`pwd`:`pwd`/../../../:`pwd`/../../libraries/python
29
30 STATUS=$(python pal.py \
31     --specification specification_CPTA.yaml \
32     --logging INFO \
33     --force)
34 RETURN_STATUS=$?
35
36 echo ${STATUS}
37 exit ${RETURN_STATUS}