diff options
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 9 |
1 files changed, 8 insertions, 1 deletions
| @@ -15,6 +15,8 @@ recursivebuild() { | |||
| 15 | done | 15 | done |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | # This function is currently unused, but we keep it in case we need to | ||
| 19 | # preprocess some m4 files. | ||
| 18 | mdpreprocess() { | 20 | mdpreprocess() { |
| 19 | file="$1" | 21 | file="$1" |
| 20 | if [ "$(echo "$file" | sed 's/.*\.//')" = "m4" ]; then | 22 | if [ "$(echo "$file" | sed 's/.*\.//')" = "m4" ]; then |
| @@ -31,7 +33,12 @@ copyfile() { | |||
| 31 | ind=$dest/index.html | 33 | ind=$dest/index.html |
| 32 | extension=$(echo "$file" | sed 's/.*\.//') | 34 | extension=$(echo "$file" | sed 's/.*\.//') |
| 33 | case "$extension" in | 35 | case "$extension" in |
| 34 | md|m4) | 36 | # m4 preprocess is currently disabled |
| 37 | #m4) | ||
| 38 | # noext=$(echo "$file" | sed 's/\..*//') | ||
| 39 | # mdpreprocess "$file" > $noext.md | ||
| 40 | # ;; | ||
| 41 | md) | ||
| 35 | t="$(markdowntitle "$file")" | 42 | t="$(markdowntitle "$file")" |
| 36 | sed "s/TITLE/$t/" < top.html > "$ind" | 43 | sed "s/TITLE/$t/" < top.html > "$ind" |
| 37 | mdpreprocess "$file" | \ | 44 | mdpreprocess "$file" | \ |
