-
Notifications
You must be signed in to change notification settings - Fork 4
/
compile.sh
100 lines (91 loc) · 1.66 KB
/
compile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/bin/bash
set -e
preproc=true
main=true
statement=true
poster=true
cd=true
presentation=true
script_dir=`dirname $0`
script_dir=`realpath $script_dir`
if $preproc; then
echo "PREPROC"
# test prerequisites
python -c "import raphaelpy"
python -c "import minieigen"
hash rsvg-convert
# figs
cd $script_dir/text/figs/raphaelpy
bash figs.sh > /tmp/figs.out
# results
cd $script_dir/results
python preproc.py
fi
# main
if $main; then
echo "MAIN"
cd $script_dir/text/main
rm -f common.tex
cd plots
bash plot.sh
cd ..
bash compile.sh > /tmp/main.out
fi
# statement
if $statement; then
echo "STATEMENT"
cd $script_dir/text/statement
rm -f common.tex
cd plots
bash plot.sh
cd ..
bash compile.sh > /tmp/statement.out
fi
# poster
if $poster; then
echo "POSTER"
cd $script_dir/text/poster
rm -f common.tex
cd plots
rm -rf plots
mkdir plots
bash plot.sh
cd ..
bash compile.sh > /tmp/poster.out
fi
# cd
if $cd; then
echo "CD"
cd $script_dir/text/cd
rm -f common.tex
bash compile.sh > /tmp/cd.out
fi
# presentation
if $presentation; then
echo "PRESENTATION"
cd $script_dir/text/presentation
rm -f common.tex
# optinially if you want to download .gif animated files
if false; then
cd figs
figstodownload=/tmp/figstodownload.txt
echo "" > $figstodownload
for f in contact1.gif multi1.gif surf1.gif vol1.gif; do
echo "http://mech.fsv.cvut.cz/~stransky/phdthesis/presentation/figs/$f" >> $figstodownload
done
wget -i $figstodownload -o /tmp/figswget.out
cd ..
fi
#
cd figs/raphaelpy
bash figs.sh > /tmp/presentationfigs.out
cd ../..
cd plots
rm -rf plots
mkdir plots
bash plot.sh
cd ..
bash compile.sh > /tmp/presentation.out
fi
echo
echo OK