Setup texbox
This commit is contained in:
commit
d20985b713
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM debian:stable
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y texlive-full
|
||||
|
||||
RUN mkdir /tex
|
||||
COPY run.sh /run.sh
|
||||
RUN chmod +x /run.sh
|
||||
|
||||
ENV TARGET=
|
||||
|
||||
WORKDIR /tex
|
||||
CMD /run.sh
|
22
run.sh
Executable file
22
run.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
ECHOPREFIX=" => "
|
||||
NULLPREFIX=" "
|
||||
|
||||
echo "=> Hello, this is \033[31mtexbox\033[0m"
|
||||
|
||||
if test "$(ls -A /tex)"; then
|
||||
# Directory not empty - user mounted directory \o/
|
||||
if [ -z "$TARGET" ]; then
|
||||
# target unset.
|
||||
TARGET="*.tex"
|
||||
fi
|
||||
|
||||
# Build the PDF
|
||||
texi2pdf $TARGET
|
||||
else
|
||||
# Directory is empty
|
||||
echo "=> Please mount your directory to /tex"
|
||||
echo " See you soon."
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user