diff options
Diffstat (limited to 'bin/build-web-site')
-rwxr-xr-x | bin/build-web-site | 46 |
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 | |||
15 | set -e | ||
16 | set -u | ||
17 | |||
18 | prefix='/home/plugins' | ||
19 | poole_dir="$prefix/web/generator" | ||
20 | site_source_dir="$prefix/exported/site/web/content" | ||
21 | site_target_dir="$poole_dir/input" | ||
22 | man_source_dir="$prefix/web/work/man" | ||
23 | man_target_dir="$site_target_dir/doc/man" | ||
24 | guidelines_source="$prefix/web/work/guidelines.html" | ||
25 | guidelines_target="$site_target_dir/doc/guidelines.html" | ||
26 | |||
27 | export 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 | # | ||
32 | rsync -aH --delete "$site_source_dir/" "$site_target_dir" | ||
33 | rsync -aH "$man_source_dir/" "$man_target_dir" | ||
34 | cp -p "$guidelines_source" "$guidelines_target" | ||
35 | |||
36 | cd "$poole_dir" | ||
37 | |||
38 | # | ||
39 | # See http://pythonhosted.org/Markdown/extensions/ for documentation on the | ||
40 | # extensions. | ||
41 | # | ||
42 | exec poole.py --build \ | ||
43 | --md-ext='extra' \ | ||
44 | --md-ext='headerid' \ | ||
45 | --md-ext='toc' \ | ||
46 | --md-ext='wikilinks' | ||