about summary refs log tree commit diff stats
path: root/compile.sh
diff options
context:
space:
mode:
authorCase Duckworth2015-03-02 23:01:03 -0700
committerCase Duckworth2015-03-02 23:01:03 -0700
commitf2398cd8d12a4055801f2eac730c5be8218beff9 (patch)
treefb378180c7426cd690d5424be8bef2bd542cb899 /compile.sh
parentFix basic typography in PAUL (diff)
downloadautocento-f2398cd8d12a4055801f2eac730c5be8218beff9.tar.gz
autocento-f2398cd8d12a4055801f2eac730c5be8218beff9.zip
Make compile.sh update file list in lozenge.js
Diffstat (limited to 'compile.sh')
-rw-r--r--compile.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/compile.sh b/compile.sh index cca4938..7e48f6e 100644 --- a/compile.sh +++ b/compile.sh
@@ -14,7 +14,18 @@ for file in src/*.txt; do # TODO: change this to work with globs & args & stuff
14 ((num += 1)) 14 ((num += 1))
15done 15done
16 16
17echo
17echo "Moving files to build directory ..." 18echo "Moving files to build directory ..."
18mv src/*.html ./ 19mv src/*.html ./
19echo
20echo "Finished compiling $num files." 20echo "Finished compiling $num files."
21###############################################
22echo
23echo "Updating js/lozenge.js with file list ..."
24
25lozengeList=( $(ls *.html | grep -v '\(_template\|loremipsum\|ipsumlorem\)') )
26
27list=$(sed -e 's/\S\+\.html/"&",/g' -e 's/,$//' -e 's/^.*$/var files=[&]/' <<< "${lozengeList[@]}")
28
29sed -i "s/var files=.*/$list/" js/lozenge.js
30
31echo "Finished."