diff options
author | Neal H. Walfield <neal@gnu.org> | 2008-12-05 14:22:27 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@gnu.org> | 2008-12-05 14:22:27 +0100 |
commit | 309fca6529444a2baa40cc029fe3db7db2000249 (patch) | |
tree | be2e7492ad76eab231a571d65d079a140da44102 /render_locally | |
parent | 5333b0c747f4fd97f05bd6c4eeaeb10a62b439e5 (diff) | |
parent | 64053fc344b6874499ddf82c6a97d6e9031a546d (diff) |
Merge branch 'master' of ssh://neal@git.sv.gnu.org/srv/git/hurd/web
Diffstat (limited to 'render_locally')
-rwxr-xr-x | render_locally | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/render_locally b/render_locally index e1c27748..29ab828b 100755 --- a/render_locally +++ b/render_locally @@ -1,36 +1,39 @@ #!/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/>. Use ``--no-usedirs'' here, so that + # not too many separate directories have to be created. + shift && + export TZ && TZ=UTC && + export DESTDIR && DESTDIR=$ROOT.rendered.official && + set x \ + --set wikistatedir="$ROOT"/.ikiwiki-official \ + --url http://www.gnu.org/software/hurd \ + --no-usedirs \ + "$@" && + 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.' |