-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile.sh
35 lines (31 loc) · 957 Bytes
/
compile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Makefile for NAR formatted annotated bibliography.
#
# Author: Titus Barik (titus@barik.net)
#
# Modified by Blaine Mooers
#
# Has to be run in the main directory with the main.aux generated after the full running of the compile.sh script.
# bibtool -x main.aux -o ./AnnotatedBibliography/AnnoBibMyBDA.bib
echo "Run from the abibXXXX subfolder"
if [ $# -lt 1 ]; then
echo 1>&2 "$0: not enough arguments"
echo "Usage1: ./compile.sh projectIndexNumber"
return 2
elif [ $# -gt 1 ]; then
echo 1>&2 "$0: too many arguments"
echo "Usage1: ./compile.sh projectIndexNumber"
return 2
fi
cd ../
bibtool -x main.aux -o ./abib$1/ab$1.bib
cd ./abib$1
pdflatex ab$1
bibtex ab$1
pdflatex ab$1
pdflatex ab$1
open -a "Preview.app" v.pdf
echo "================================================"
echo "All done! ab'$1'.pdf has been created. - Blaine"
echo "================================================"
# clean:
rm -rf ab$1.log ab$1.blg ab$1.bbl ab$1.aux