diff options
Diffstat (limited to 'compile.sh')
-rw-r--r-- | compile.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/compile.sh b/compile.sh index eb896b7..e6b3141 100644 --- a/compile.sh +++ b/compile.sh | |||
@@ -1,9 +1,7 @@ | |||
1 | # for windows only right now | ||
2 | |||
3 | num=0 | 1 | num=0 |
4 | for file in src/{.[!.]*,*}.txt; do | 2 | for file in src/{.[!.]*,*}.txt; do |
5 | # TODO: change this to work with globs & args & stuff | 3 | # TODO: change this to work with globs & args & stuff |
6 | echo -n "Compiling $file ..." | 4 | echo -n "Compiling $file to HTML5" |
7 | pandoc -f markdown \ | 5 | pandoc -f markdown \ |
8 | -t html5 \ | 6 | -t html5 \ |
9 | --template=.template.html \ | 7 | --template=.template.html \ |
@@ -11,6 +9,11 @@ for file in src/{.[!.]*,*}.txt; do | |||
11 | --mathml \ | 9 | --mathml \ |
12 | "$file" \ | 10 | "$file" \ |
13 | -o "${file%.txt}.html" | 11 | -o "${file%.txt}.html" |
12 | echo -n " & RIVER ..." | ||
13 | pandoc -f markdown \ | ||
14 | -t lua/river.lua \ | ||
15 | "$file" \ | ||
16 | -o "${file%.txt}.river" | ||
14 | echo " Done." | 17 | echo " Done." |
15 | ((num += 1)) | 18 | ((num += 1)) |
16 | done | 19 | done |
@@ -18,6 +21,12 @@ done | |||
18 | echo | 21 | echo |
19 | echo "Moving files to build directory ..." | 22 | echo "Moving files to build directory ..." |
20 | mv src/{.[!.]*,*}.html ./ | 23 | mv src/{.[!.]*,*}.html ./ |
24 | echo "Moving RIVERs to river/ ..." | ||
25 | mv src/{.[!.]*,*}.river river/ | ||
26 | echo "Concatenating and counting rivers ..." | ||
27 | cat river/*.river | \ | ||
28 | sed -e "s/^\s\+//" -e "s/\s\+$//" -e 's/--\+/\n/g' | \ | ||
29 | sort | uniq -c | sort >river/COUNTS.txt | ||
21 | echo "Finished compiling $num files." | 30 | echo "Finished compiling $num files." |
22 | ############################################### | 31 | ############################################### |
23 | echo | 32 | echo |