1
0
mirror of https://gitlab.com/tiggr/a318.git synced 2024-12-26 23:00:23 +01:00
a318/PDF/build.sh

36 lines
721 B
Bash
Raw Normal View History

2018-10-09 21:04:38 +02:00
#!/bin/bash
out="handout.pdf"
while [ "$1" != '' ]
do
[ $1 == "-nolist" ] && nolist=true && shift
[ $1 == "-o" ] && shift && out=$1 && shift
done
if [ "$nolist" == true ]
then
list="T"
listpdf="leer.pdf"
listpdftk="${list}=${listpdf}"
else
list="T"
listpdf="../../Teilnehmer/Teilnehmer.pdf"
listpdftk="${list}=${listpdf}"
fi
echo cleaning before build ...
rm handout.pdf 2> /dev/null
rm temp* 2> /dev/null
echo building handout ...
2018-11-04 20:48:12 +01:00
pdftk C=../main.pdf E=leer.pdf O=../backside.pdf cat C E E O output temp.pdf verbose
2018-10-09 21:04:38 +02:00
echo updating metadata and compress
pdftk temp.pdf update_info meta.txt output $out compress
echo cleaning after build ...
rm temp*.* 2> /dev/null
echo Done!