aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorBlaise Thompson <blaise@untzag.com>2017-10-16 08:54:52 -0500
committerBlaise Thompson <blaise@untzag.com>2017-10-16 08:54:52 -0500
commit4387f96aef0dcafbbce06e76cf19224537d98772 (patch)
tree37a3624de1baa3d51216a49551d9047e90175bfe /build.sh
parent261f1a039bd432c9a7e5d37aa403aa3cd5c6d5ed (diff)
adjustable periscopes
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh57
1 files changed, 57 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..d021877
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,57 @@
+set -e # force exit upon error
+
+function printColor {
+ YELLOW='\033[0;33m'
+ NC='\033[0m' # No Color
+ printf "${YELLOW}$*${NC}\n"
+}
+
+function printLine {
+ printColor "%`tput cols`s"|tr ' ' '#'
+}
+
+function printThenPython {
+ printColor "python $*"
+ python "$*"
+}
+
+if [[ $# -eq 0 ]] ; then
+ echo 'please provide an argument in [data, simulations, figures, documents, all]'
+ exit 1
+fi
+
+# process data
+if [[ "$1" = "all" ]] || [[ "$1" = "data" ]] ; then
+ printLine
+ printColor data
+ #printThenPython "data/TA A.py"
+ #printThenPython "data/TA B.py"
+ #printThenPython "data/TG A.py"
+ #printThenPython "data/TG B.py"
+fi
+
+# make figures
+if [[ "$1" = "all" ]] || [[ "$1" = "figures" ]] ; then
+ printLine
+ printColor figures
+ #printThenPython "figures/absorbance.py"
+ #printThenPython "figures/m_factors.py"
+ #printThenPython "figures/movies_fitted.py"
+ #printThenPython "figures/movies_combined.py"
+ #printThenPython "figures/power_factors.py"
+ #printThenPython "figures/driven_initial.py"
+ #printThenPython "figures/TA_artifacts.py"
+ #printThenPython "figures/TG_artifacts.py"
+fi
+
+# render documents
+if [[ "$1" = "all" ]] || [[ "$1" = "dissertation" ]] ; then
+ printLine
+ printColor documents
+ pdflatex --interaction=nonstopmode dissertation
+ bibtex main
+ pdflatex --interaction=nonstopmode dissertation
+ pdflatex --interaction=nonstopmode dissertation
+fi
+
+printColor finished