summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2021-03-10 22:21:35 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2021-03-10 22:25:44 +0100
commit9f74233ffedb0609d43d54b6169dc47dd6337803 (patch)
tree724af2631940cf523ae2b3ac62376ae6b89e2dbc /build.sh
parent1e44953621928120f5ee674c4582e33d6e625e62 (diff)
downloadquatuorbellefeuille.com-9f74233ffedb0609d43d54b6169dc47dd6337803.tar.xz
Add plumbing for English website
No link to switch from one language to the other yet. Also, some pages are now out-of-date wrt their French version; not a big deal, since we'll need to go over each page anyway.
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}