Test suite: adapt test after warning moved to after Unsafe Browser verification dialog.
[tails.git] / build-website
blobb7d0928a163965244d4eaf0dc2e327da24e7a1f7
1 #!/bin/sh
3 set -e
4 set -u
6 FATAL_SANITY_CHECK=yes
8 # Parse arguments aimed at this wrapper, and drop them from $@ so we
9 # can pass it on to ikiwiki.
10 for arg in "${@}"; do
11 shift
12 if [ "${arg}" = --non-fatal-sanity-check ]; then
13 FATAL_SANITY_CHECK=no
14 continue
16 set -- "${@}" "${arg}"
17 done
19 git_dir="$(git rev-parse --show-toplevel)"
20 if ! "${git_dir}/bin/sanity-check-website" ; then
21 if [ "${FATAL_SANITY_CHECK}" != no ]; then
22 echo "Some pages in our wiki are bad! Please fix them or re-run" \
23 "with the --non-fatal-sanity-check option" >&2
24 exit 1
28 # If I knew Ikiwiki better I'd probably figure out how to just make it
29 # keep the misc/*.html files as-is instead of this hack.
30 fixup_14962_workaround() {
31 mkdir -p config/chroot_local-includes/usr/share/doc/tails/website/misc
32 rm -f config/chroot_local-includes/usr/share/doc/tails/website/misc/*
33 cp wiki/src/misc/*.html \
34 config/chroot_local-includes/usr/share/doc/tails/website/misc
37 ikiwiki -setup ikiwiki.setup -refresh "$@" && fixup_14962_workaround