summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-09-08 18:09:10 +0300
committerLars Wirzenius <liw@liw.fi>2019-09-08 18:09:10 +0300
commit7aff39ade5349ee262c100a509c10d201edf544a (patch)
treea252ffca0f90e5ac5bcef09a3faa331d376fd825 /build.sh
parent137df8449f3212d9e32dc13c920373bcd7026c84 (diff)
downloadsubplot.liw.fi-7aff39ade5349ee262c100a509c10d201edf544a.tar.gz
Change: build.sh to copy images created by Pandoc filter to destdir
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/build.sh b/build.sh
index 398cff9..c6fe6d0 100755
--- a/build.sh
+++ b/build.sh
@@ -8,3 +8,16 @@ destdir="$2"
find "$destdir" -mindepth 1 -delete
sed -i "s,^destdir:.*,destdir: $destdir," ikiwiki.setup
ikiwiki --setup ikiwiki.setup --rebuild --verbose --libdir "$libdir"
+
+# Pandoc runs the filter in srcdir. Filter creates images in
+# ./foo-images directories, under srcdir. Ikiwiki doesn't know about
+# those files, since they get created while it is running. This copies
+# image directories to destdir so they show up when the rendered site
+# is viewed.
+#
+# NOTE: This needs to list the image directories when more image types
+# are added.
+for dir in dot-images
+do
+ cp -a "$dir" "$destdir/."
+done