CSIT-755: Presentation and analytics layer
[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 CFG[BLD_LATEX]=1
13
14 # Install system dependencies
15 sudo apt-get -y update
16 sudo apt-get -y install libxml2 libxml2-dev libxslt-dev build-essential \
17     zlib1g-dev unzip
18
19 if [[ ${CFG[BLD_LATEX]} -eq 1 ]] ;
20 then
21     sudo apt-get -y install xvfb texlive-latex-recommended \
22         texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra latexmk wkhtmltopdf inkscape
23     sudo sed -i.bak 's/^\(main_memory\s=\s\).*/\110000000/' /usr/share/texlive/texmf-dist/web2c/texmf.cnf
24 fi
25
26 # Clean-up when finished
27 trap 'rm -rf ${DIR[WORKING]}; exit' EXIT
28 trap 'rm -rf ${DIR[WORKING]}; exit' ERR
29
30 # Create working directories
31 mkdir ${DIR[WORKING]}
32
33 # Create virtual environment
34 virtualenv ${DIR[WORKING]}/env
35 . ${DIR[WORKING]}/env/bin/activate
36
37 # Install python dependencies:
38 pip install -r requirements.txt
39
40 export PYTHONPATH=`pwd`
41
42 python pal.py \
43     --specification specification.yaml \
44     --release ${RELEASE} \
45     --logging INFO \
46     --force

©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.