Setup texbox

This commit is contained in:
maride 2018-05-04 19:33:31 +02:00
commit d20985b713
2 changed files with 35 additions and 0 deletions

13
Dockerfile Normal file
View 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
View 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