summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdeploy.sh43
-rw-r--r--template_Mathnotes.tex2
2 files changed, 44 insertions, 1 deletions
diff --git a/deploy.sh b/deploy.sh
new file mode 100755
index 0000000..3fde734
--- /dev/null
+++ b/deploy.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+cur=`pwd`
+
+cd ~/
+
+homedir=`pwd`
+
+path="${homedir}/Documents/texassets"
+
+# First we will deploy the texassets directory
+
+echo "Deploying assets folder. This will let you compile the latex templates"
+
+if [[ -f $path ]]
+then
+ echo "Path already exists, exiting"
+ exit
+fi
+
+if [[ -d ${path} ]]
+then
+ echo "Path already exists but is file, copying files"
+else
+ echo "Path does not exist, making new folder and copying files"
+ mkdir ${path}
+fi
+cd $cur
+cp "${cur}/assets/"*.png ${path}
+
+echo "done"
+
+# Now we modify the template files so that they point to the right directory
+
+echo "Modifying the template files"
+
+for file in `ls | grep .tex`
+do
+ sed -r "s/^### Insert graphicspath command here ###/\\\graphicspath {$path}/" -i $file
+done
+
+echo "done"
+
diff --git a/template_Mathnotes.tex b/template_Mathnotes.tex
index aa271e5..4a81891 100644
--- a/template_Mathnotes.tex
+++ b/template_Mathnotes.tex
@@ -22,7 +22,7 @@
\usepackage{listings}
\usepackage{color}
\usepackage{xifthen}
-\graphicspath{ {/home/josh/Documents/texassets/} }
+### Insert graphicspath command here ###
\definecolor{dkgreen}{rgb}{0,0.6,0}
%\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{red}{HTML}{ffb3b3}