summaryrefslogtreecommitdiff
path: root/build.sh
blob: 3dd978e8e4a804f05c44f810b1c31265f2e16350 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

set -eu

libdir="$1"
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 roadmap-images
do
    if [ -e "$dir" ]
    then
       cp -a "$dir" "$destdir/."
    fi
done