summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/build.sh b/build.sh
index 74e9ab8..a9035f3 100755
--- a/build.sh
+++ b/build.sh
@@ -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}