Merge remote-tracking branch 'origin/master'
[tails.git] / build-website
blobf5001d0858aa9d4ca0dd31f1747afd7d9c1af4f7
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 ikiwiki -setup ikiwiki.setup -refresh "$@"