Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- DIR=$(dirname "$1")
- FILENAME=$(basename "$1")
- EXTENSION="${FILENAME##*.}"
- FILENAME="${FILENAME%.*}"
- if [ $EXTENSION != "tex" ]; then
- echo "File is not a .tex file."
- exit 0
- fi
- cd $DIR
- find . -type f -not -name '*.tex' -not -name '*.sh' | xargs rm --
- pdflatex $FILENAME".tex"
- bibtex $FILENAME".aux"
- makeglossaries $FILENAME
- makeindex $FILENAME".nlo" -s nomencl.ist -o $FILENAME".nls"
- pdflatex $FILENAME".tex"
- pdflatex $FILENAME".tex"
- exit 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement