Permalink
Browse files

Modify convert_to_tex.sh to use the first parameter as build directory

  • Loading branch information...
1 parent 1d0c576 commit 53c34de76c9f9cd82b404ebb7ed9f26c47e98c1e @pettter pettter committed Oct 20, 2012
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/convert_to_tex.sh
View
@@ -1,3 +1,13 @@
+#!/bin/bash
+if [ -z $1 ] ; then
+ DIR=.
+else
+ DIR=$1
+fi
+mkdir $DIR
+for d in chapter*; do
+ mkdir $DIR/$d
+done
for f in */*.md; do
- pandoc -f markdown -t latex $f -o $f.tex
+ pandoc -f markdown -t latex $f -o $DIR/$f.tex
done

0 comments on commit 53c34de

Please sign in to comment.