diff options
author | Case Duckworth | 2015-03-02 23:01:03 -0700 |
---|---|---|
committer | Case Duckworth | 2015-03-02 23:01:03 -0700 |
commit | f2398cd8d12a4055801f2eac730c5be8218beff9 (patch) | |
tree | fb378180c7426cd690d5424be8bef2bd542cb899 /compile.sh | |
parent | Fix basic typography in PAUL (diff) | |
download | autocento-f2398cd8d12a4055801f2eac730c5be8218beff9.tar.gz autocento-f2398cd8d12a4055801f2eac730c5be8218beff9.zip |
Make compile.sh update file list in lozenge.js
Diffstat (limited to 'compile.sh')
-rw-r--r-- | compile.sh | 13 |
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)) |
15 | done | 15 | done |
16 | 16 | ||
17 | echo | ||
17 | echo "Moving files to build directory ..." | 18 | echo "Moving files to build directory ..." |
18 | mv src/*.html ./ | 19 | mv src/*.html ./ |
19 | echo | ||
20 | echo "Finished compiling $num files." | 20 | echo "Finished compiling $num files." |
21 | ############################################### | ||
22 | echo | ||
23 | echo "Updating js/lozenge.js with file list ..." | ||
24 | |||
25 | lozengeList=( $(ls *.html | grep -v '\(_template\|loremipsum\|ipsumlorem\)') ) | ||
26 | |||
27 | list=$(sed -e 's/\S\+\.html/"&",/g' -e 's/,$//' -e 's/^.*$/var files=[&]/' <<< "${lozengeList[@]}") | ||
28 | |||
29 | sed -i "s/var files=.*/$list/" js/lozenge.js | ||
30 | |||
31 | echo "Finished." | ||