summaryrefslogtreecommitdiff
path: root/render_locally
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2008-11-20 18:57:05 +0100
committerThomas Schwinge <tschwinge@gnu.org>2008-11-20 18:57:05 +0100
commit262b8f4401d882c3dfd8d0e5450ed5521a25cd02 (patch)
treef436463965ce00fa02ca7284474f2e55510ff216 /render_locally
parentb730443d009d91fea7baedcf68fe0b32631f9681 (diff)
ikiwiki.setup: New file.
Use it in `render_locally' instead of repeating all configuration. Also add a `--official' option.
Diffstat (limited to 'render_locally')
-rwxr-xr-xrender_locally52
1 files changed, 26 insertions, 26 deletions
diff --git a/render_locally b/render_locally
index e1c27748..ddd7afc6 100755
--- a/render_locally
+++ b/render_locally
@@ -1,36 +1,36 @@
#!/bin/sh
-# Render the pages of this repository for your local browsing pleasure.
-
-# We use ``--no-usedirs'' here, because when browsing local files, the web
-# browsers don't display `index.html' files by default when a hyperlink
-# referencing a directory is being opened.
+# Render the pages of this repository.
# Written by Thomas Schwinge <tschwinge@gnu.org>
+export ROOT && ROOT=$(readlink -f "$(dirname "$0")") &&
-# Need a symlink-free path.
-src=$(readlink -f "$(dirname "$0")") &&
-dest=$src.rendered &&
+case $1 in
+ --official)
+ # Use this for rendering the set of pages which are to be installed under
+ # <http://www.gnu.org/software/hurd/>.
+ shift &&
+ export TZ && TZ=UTC &&
+ export DESTDIR && DESTDIR=$ROOT.rendered.official &&
+ set x \
+ --set wikistatedir="$ROOT"/.ikiwiki-official \
+ "$@" &&
+ shift;;
+ *)
+ # Use ``--no-usedirs'' here, because when browsing local files, the web
+ # browsers don't display `index.html' files by default when a hyperlink
+ # referencing a directory is being opened.
+ set x \
+ --no-usedirs \
+ "$@" &&
+ shift;;
+esac &&
ikiwiki \
- --verbose \
- --wikiname GNU\ Hurd \
- --templatedir "$src"/.templates \
- --userdir user \
- --no-usedirs \
- --plugin favicon \
- --plugin goodstuff \
- --plugin html \
- --plugin sidebar \
- --plugin table \
- --plugin txt \
- --libdir "$src"/.library \
- --plugin copyright \
- --plugin license \
- --plugin texinfo \
- ${1+"$@"} \
- "$src" "$dest" &&
+ --setup "$ROOT"/ikiwiki.setup \
+ --refresh \
+ "$@" &&
echo &&
-echo Now\ open\ \`"$dest"/index.html\'' to browse the web pages.'
+echo Now\ open\ \`"${DESTDIR-"$ROOT".rendered}"/index.html\'' to browse the web pages.'