compile.sh 520 Bytes
Newer Older
Harry Fuchs's avatar
Harry Fuchs committed
1

Harry Fuchs's avatar
Harry Fuchs committed
2
3
4
inotifywait -e close_write,moved_to,create -m . |
while read -r directory events filename; do
  if [ "$filename" = "edit-this-file.tex" ]; then
Harry Fuchs's avatar
Harry Fuchs committed
5
6
    cp edit-this-file.tex tmp.tex
    python3 preprocessor.py
Harry Fuchs's avatar
Harry Fuchs committed
7
8
9
10
    pandoc -f org -t latex tmp.tex -s -o gdim.tex --metadata-file meta.yaml --template="latex.template"

    clear && clear
    echo "start pdflatex"
Harry Fuchs's avatar
Harry Fuchs committed
11
12
13
    pdflatex -interaction=nonstopmode gdim.tex
    #pdflatex gdim.tex

Harry Fuchs's avatar
Harry Fuchs committed
14
    #TODO rename
Harry Fuchs's avatar
Harry Fuchs committed
15
    mv gdim.pdf dgeo-alekseev.pdf
Harry Fuchs's avatar
Harry Fuchs committed
16
echo "wait for next change..."
Harry Fuchs's avatar
Harry Fuchs committed
17
18
  fi
done