#!/bin/sh
RESULT_DIR="result"
OUTPUT_DIR="../temp"
FILE="thesis"
mkdir $RESULT_DIR
cd tex
mkdir $OUTPUT_DIR
pdflatex -output-directory="$OUTPUT_DIR" -synctex=1 -interaction=nonstopmode ${FILE}.tex 
bibtex $OUTPUT_DIR/${FILE}.aux
makeindex $OUTPUT_DIR/${FILE}.idx
pdflatex -output-directory="$OUTPUT_DIR" -synctex=1 -interaction=nonstopmode ${FILE}.tex
pdflatex -output-directory="$OUTPUT_DIR" -synctex=2 -interaction=nonstopmode ${FILE}.tex
cat $OUTPUT_DIR/${FILE}.pdf > ../$RESULT_DIR/${FILE}.pdf
cd ..


#!/bin/sh
RESULT_DIR="../result"
OUTPUT_DIR="../temp"
FILE="thesis"
cd tex
mkdir $RESULT_DIR
mkdir $OUTPUT_DIR
cp literatur.bib $OUTPUT_DIR
pdflatex -output-directory="$OUTPUT_DIR" -synctex=1 -interaction=nonstopmode ${FILE}.tex 
cd $OUTPUT_DIR
bibtex ${FILE}.aux
makeindex ${FILE}.idx
cd ../tex
pdflatex -output-directory="$OUTPUT_DIR" -synctex=1 -interaction=nonstopmode ${FILE}.tex
pdflatex -output-directory="$OUTPUT_DIR" -synctex=2 -interaction=nonstopmode ${FILE}.tex
cat $OUTPUT_DIR/${FILE}.pdf > $RESULT_DIR/${FILE}.pdf
cd ..


Fix to shell script. Now it works like Makefile
Fix to shell script. Now it works like Makefile
