PAL: Fix path to the theme
[csit.git] / resources / tools / presentation / run_report.sh
1 #!/bin/bash
2
3 set -x
4
5 RELEASE=$1
6
7 # set default values in config array
8 typeset -A CFG
9 typeset -A DIR
10
11 DIR[WORKING]=_tmp
12
13 # Install system dependencies
14 sudo apt-get -y update
15 sudo apt-get -y install libxml2 libxml2-dev libxslt-dev build-essential \
16     zlib1g-dev unzip
17
18 if [[ ${CFG[BLD_LATEX]} -eq 1 ]] ;
19 then
20     sudo apt-get -y install xvfb texlive-latex-recommended \
21         texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra latexmk wkhtmltopdf inkscape
22     sudo sed -i.bak 's/^\(main_memory\s=\s\).*/\110000000/' /usr/share/texlive/texmf-dist/web2c/texmf.cnf
23 fi
24
25 # Create working directories
26 mkdir ${DIR[WORKING]}
27
28 # Create virtual environment
29 virtualenv -p $(which python3) ${DIR[WORKING]}/env
30 source ${DIR[WORKING]}/env/bin/activate
31
32 # Install python dependencies:
33 pip3 install -r requirements.txt
34
35 export PYTHONPATH=`pwd`:`pwd`/../../../:`pwd`/../../libraries/python
36
37 python pal.py \
38     --specification specification.yaml \
39     --release ${RELEASE} \
40     --week "49" \
41     --logging INFO \
42     --force
43
44 RETURN_STATUS=$(echo $?)
45 exit ${RETURN_STATUS}