-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·33 lines (28 loc) · 786 Bytes
/
Copy pathbuild.sh
File metadata and controls
executable file
·33 lines (28 loc) · 786 Bytes
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
#!/bin/sh -l
# Constants
readonly MOUNT_POINT='/workspace'
usage() { echo "Usage: $0 -u <DOCKER_USERNAME> -w <WORK_DIR> [-h]" 1>&2; exit 1; }
unset -v DOCKER_USERNAME WORK_DIR
while getopts ":u:w:h" opt; do
case $opt in
u)
DOCKER_USERNAME="$OPTARG"
;;
w)
WORK_DIR="${OPTARG:-$(pwd)}"
;;
h|*)
usage
;;
esac
done
# Set WORK_DIR if it was not sent on the CLI
WORK_DIR="${WORK_DIR:-$(pwd)}"
docker run --rm \
-v "$WORK_DIR:$MOUNT_POINT" \
-w "$MOUNT_POINT" \
-u "$DOCKER_USERNAME" \
ghcr.io/quasar6x/thesis-builder:latest \
/bin/bash -c "\
latexmk -jobname=Szucs_Daniel_BSY9BQ_MSc_Thesis src/thesis.tex; \
latexmk -jobname=Szucs_Daniel_BSY9BQ_MSc_Thesis_Slides src/slides.tex"