diff options
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -32,13 +32,20 @@ sed -i s/'{TITLE}'/"${title}"/ ${output} link_stylesheets='' for s in "${stylesheets[@]}" do - spath=$(realpath --relative-to $(dirname "${input}") stylesheets/"${s}".css) + # Prefer relative paths so that drafts under /admin/drafts find + # the correct stylesheets. + # ${input} might be a temporary file; assume ${template} is a + # bona-fide node in our directory hierarchy, and use that to + # compute the path to the stylesheets folder. + spath=$(realpath --relative-to $(dirname "${template}") stylesheets/"${s}".css) link_template='<link rel="stylesheet" href="%s">\n' link_stylesheets+=$(printf "${link_template}" "${spath}") done sed -i /'{STYLESHEETS}'/'c\'"${link_stylesheets}" ${output} +sed -i s/'{TRANSLATION}'/"${translation}"/ ${output} + for transform in "${transforms[@]}" do sed -i "${transform}" ${output} |
