summaryrefslogtreecommitdiffstats
path: root/bin/build-web-site
diff options
context:
space:
mode:
Diffstat (limited to 'bin/build-web-site')
-rwxr-xr-xbin/build-web-site46
1 files changed, 46 insertions, 0 deletions
diff --git a/bin/build-web-site b/bin/build-web-site
new file mode 100755
index 0000000..95ac355
--- /dev/null
+++ b/bin/build-web-site
@@ -0,0 +1,46 @@
1#!/bin/sh
2#
3# Copyright (c) 2013 Nagios Plugins Development Team
4#
5# Originally written by Holger Weiss <holger@zedat.fu-berlin.de>.
6#
7# This file is free software; the Nagios Plugins Development Team gives
8# unlimited permission to copy and/or distribute it, with or without
9# modifications, as long as this notice is preserved.
10#
11# This program is distributed in the hope that it will be useful, but WITHOUT
12# ANY WARRANTY, to the extent permitted by law; without even the implied
13# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
15set -e
16set -u
17
18prefix='/home/plugins'
19poole_dir="$prefix/web/generator"
20site_source_dir="$prefix/exported/site/web/content"
21site_target_dir="$poole_dir/input"
22man_source_dir="$prefix/web/work/man"
23man_target_dir="$site_target_dir/doc/man"
24guidelines_source="$prefix/web/work/guidelines.html"
25guidelines_target="$site_target_dir/doc/guidelines.html"
26
27export PATH="$prefix/src/poole:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin"
28
29#
30# Collect the pieces of the site.
31#
32rsync -aH --delete "$site_source_dir/" "$site_target_dir"
33rsync -aH "$man_source_dir/" "$man_target_dir"
34cp -p "$guidelines_source" "$guidelines_target"
35
36cd "$poole_dir"
37
38#
39# See http://pythonhosted.org/Markdown/extensions/ for documentation on the
40# extensions.
41#
42exec poole.py --build \
43 --md-ext='extra' \
44 --md-ext='headerid' \
45 --md-ext='toc' \
46 --md-ext='wikilinks'