-
Notifications
You must be signed in to change notification settings - Fork 11
/
make_timesheets.sh
executable file
·30 lines (24 loc) · 1.16 KB
/
make_timesheets.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
#!/bin/sh
# Update timesheets in the repository
DIR="current/timesheet"
NAME="itdr_timesheet"
DOUBLE="${NAME}_double"
mkdir "$DIR"
# plain timesheets
pdflatex -interaction=nonstopmode -jobname="$NAME" "\let\ifplain\iftrue\input{${NAME}}"
cp "$NAME".pdf "${DIR}/${NAME}_plain.pdf"
# double_a4
pdflatex -interaction=nonstopmode -output-directory="$DIR" -jobname="${DOUBLE}_plain_a4" "\documentclass[a4paper]{article} \input{${DOUBLE}.tex}"
# double_letter
pdflatex -interaction=nonstopmode -output-directory="$DIR" -jobname="${DOUBLE}_plain_letter" "\documentclass[letterpaper]{article} \input{${DOUBLE}.tex}"
# fancy timesheets
pdflatex -interaction=nonstopmode -jobname="$NAME" "$NAME" # first run
pdflatex -interaction=nonstopmode -jobname="$NAME" "$NAME" # second run
cp "$NAME".pdf "${DIR}/${NAME}_fancy.pdf"
# double_a4
pdflatex -interaction=nonstopmode -output-directory="$DIR" -jobname="${DOUBLE}_fancy_a4" "\documentclass[a4paper]{article} \input{${DOUBLE}.tex}"
# double_letter
pdflatex -interaction=nonstopmode -output-directory="$DIR" -jobname="${DOUBLE}_fancy_letter" "\documentclass[letterpaper]{article} \input{${DOUBLE}.tex}"
sh cleanup.sh
sh cleanup.sh "$DIR"
exit 0