-
Notifications
You must be signed in to change notification settings - Fork 60
/
makepdfs
executable file
·47 lines (37 loc) · 876 Bytes
/
makepdfs
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
#!/bin/bash
baseDir=`dirname $0`
outputDir=${baseDir}/pdf
exclude=('figures' 'figures-dia' 'figures-source' 'latex' 'makepdfs' 'pdf' 'README.md' 'AUTHORS.md' 'Rakefile' 'couchapp' 'epub' 'makeebooks' 'summary.rb' 'book' 'doc' 'main.pyg')
dirContent=`ls $baseDir`
argString=""
echo $i;
for dir in $dirContent; do
if [ -n $dir ]; then
isLang=1
for i in ${exclude[@]}; do
if [ $i == $dir ]; then
isLang=0
fi
done
if [ $isLang -eq 1 ]; then
if [ "$1" = "" ]; then
argString="${argString} ${dir}"
else
for i in ${@}; do
if [ $i = $dir ]; then
argString="${argString} ${dir}"
fi
done
fi
fi
fi
done
echo "Will generate pdf for the following languages:"
echo " "$argString
mkdir -p $outputDir
echo
echo "The generation process will start now."
time ${baseDir}/latex/makepdf $argString
echo
echo
echo "Done!"