diff options
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -4,9 +4,10 @@ set -eu input=$1 parameters=$2 -output=$3 +template=$3 +output=$4 -cp template.html ${output} +cp ${template} ${output} transform-li-current-a () { @@ -31,8 +32,9 @@ sed -i s/'{TITLE}'/"${title}"/ ${output} link_stylesheets='' for s in "${stylesheets[@]}" do - link_template='<link rel="stylesheet" href="stylesheets/%s.css">\n' - link_stylesheets+=$(printf "${link_template}" "${s}") + spath=$(realpath --relative-to $(dirname "${input}") 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} |
