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