From 9ee7052f6b92dd9fd63e73c92c704aef90592826 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 3 Mar 2015 16:45:25 -0700 Subject: Change compile method to utilize hidden files --- compile.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'compile.sh') diff --git a/compile.sh b/compile.sh index c07f80c..908188b 100644 --- a/compile.sh +++ b/compile.sh @@ -1,14 +1,15 @@ # for windows only right now num=0 -for file in src/*.txt; do # TODO: change this to work with globs & args & stuff +for file in src/{.[!.]*,*}.txt; do + # TODO: change this to work with globs & args & stuff echo -n "Compiling $file ..." pandoc -f markdown \ -t html5 \ - --template=_template.html \ + --template=.template.html \ --smart \ --mathml \ - $file \ + "$file" \ -o "${file%.txt}.html" echo " Done." ((num += 1)) @@ -22,10 +23,10 @@ echo "Finished compiling $num files." echo echo "Updating js/lozenge.js with file list ..." -lozengeList=( $(ls *.html | grep -v '\(_template\|loremipsum\|ipsumlorem\)') ) +lozengeList=( $(ls *.html) ) list=$(sed -e 's/\S\+\.html/"&",/g' -e 's/,$//' -e 's/^.*$/var files=[&]/' <<< "${lozengeList[@]}") sed -i "s/var files=.*/$list/" js/lozenge.js -echo "Finished." +echo "Finished updating: ${#lozengeList[@]} files." -- cgit 1.4.1-21-gabe81