diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-29 22:03:24 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-29 22:03:24 (GMT) |
commit | 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 (patch) | |
tree | 1c2b6b21704a294940f87c7892676998d8371707 /libexec/post-receive.d/04-build-web-site | |
download | site-0b6423f9c99d9edf8c96fefd0f6c453859395aa1.tar.gz |
Import Nagios Plugins site
Import the Nagios Plugins web site, Cronjobs, infrastructure scripts,
and configuration files.
Diffstat (limited to 'libexec/post-receive.d/04-build-web-site')
-rwxr-xr-x | libexec/post-receive.d/04-build-web-site | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/libexec/post-receive.d/04-build-web-site b/libexec/post-receive.d/04-build-web-site new file mode 100755 index 0000000..68a439c --- /dev/null +++ b/libexec/post-receive.d/04-build-web-site | |||
@@ -0,0 +1,33 @@ | |||
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 | repository=${PWD##*/} | ||
20 | web_repositories='nagios-plugins.git site.git' | ||
21 | web_branch='master' | ||
22 | |||
23 | for web_repository in $web_repositories | ||
24 | do | ||
25 | if [ "$repository" = "$web_repository" ] | ||
26 | then | ||
27 | while read old new ref | ||
28 | do | ||
29 | test "${ref#refs/heads/}" = "$web_branch" \ | ||
30 | && exec "$prefix/bin/build-web-site" >'/dev/null' | ||
31 | done | ||
32 | fi | ||
33 | done | ||