diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-10-14 21:22:41 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-10-14 21:22:41 +0200 |
| commit | 0150994cfd3260afada9559c8f524fdf217871df (patch) | |
| tree | 7d44a02f8e664b1e3a9e4c8fc422f54ca9e19ad8 /build.sh | |
| parent | ba86aff0a60ef19e26fda9b903495084ae9c0e77 (diff) | |
| download | sebastiano.tronto.net-0150994cfd3260afada9559c8f524fdf217871df.tar.gz sebastiano.tronto.net-0150994cfd3260afada9559c8f524fdf217871df.zip | |
Check in pre-processed m4 files, skip m4 step in build
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" | \ |
