]> code.communitydata.science - cdsc_tex.git/commitdiff
updated the create documents scripts
authorBenjamin Mako Hill <mako@atdot.cc>
Sat, 4 Aug 2018 18:19:33 +0000 (11:19 -0700)
committerBenjamin Mako Hill <mako@atdot.cc>
Sat, 4 Aug 2018 18:19:33 +0000 (11:19 -0700)
- changed to use the new location
- switched to use the correct branches

new_knitr_document [new file with mode: 0755]
new_tex_assignment
new_tex_document

diff --git a/new_knitr_document b/new_knitr_document
new file mode 100755 (executable)
index 0000000..9766b5f
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Helper script to export LaTeX templates for new documents
+# Copyright (c) 2009-2016 Benjamin Mako Hill <mako@atdot.cc>
+# Released under the GPLv3 or later.
+
+CURDIR=$(pwd)
+TMPDIR=$(mktemp -d)
+
+if test $1
+then
+    cd "$HOME/tex/cdsc_tex"
+    git archive --format=tar knitr paper_template|tar x --strip=1 -C "$TMPDIR"
+    cd "$CURDIR"
+
+    # get rid of paper_template subdir
+    mv "$TMPDIR" "$1"
+    cd "$1";
+    mv "text.Rnw" "$1.Rnw"
+else
+    echo "specifiy a directory where the template should go";
+fi
index e8858e10afc383bec367243255295950e34744fc..89b6819620acb8a08c16880b669557caa402bde8 100755 (executable)
@@ -9,8 +9,8 @@ TMPDIR=$(mktemp -d)
 
 if test $1
 then
-    cd "$HOME/tex/latex_mako"
-    git archive --format=tar HEAD assignment_template|tar x --strip=1 -C "$TMPDIR"
+    cd "$HOME/tex/cdsc_tex"
+    git archive --format=tar master assignment_template|tar x --strip=1 -C "$TMPDIR"
     cd "$CURDIR"
 
     # get rid of paper_template subdir
index d782d1c3270a1bfd8a22687b3d00d484d50b43ea..f74e52a5ccf6e1feaeb3384e7847185e36c9b443 100755 (executable)
@@ -9,8 +9,8 @@ TMPDIR=$(mktemp -d)
 
 if test $1
 then
-    cd "$HOME/tex/latex_mako"
-    git archive --format=tar HEAD paper_template|tar x --strip=1 -C "$TMPDIR"
+    cd "$HOME/tex/cdsc_tex"
+    git archive --format=tar master paper_template|tar x --strip=1 -C "$TMPDIR"
     cd "$CURDIR"
 
     # get rid of paper_template subdir

Community Data Science Collective || Want to submit a patch?