summaryrefslogtreecommitdiffstats
path: root/libexec/post-receive.d/01-git-export
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-10-06 23:53:18 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-10-06 23:53:18 (GMT)
commit76af1279d9a4ab574d87e93466166b7b210c2bad (patch)
treebf6340b28aab2e275662b9a6198ded45db8f316c /libexec/post-receive.d/01-git-export
parentb2c8b7821e7e4ff82c65f0ab360ae067dded9e94 (diff)
downloadsite-76af1279d9a4ab574d87e93466166b7b210c2bad.tar.gz
Move test site hooks into separate file
Put the code for creating the test instance into a separate hook file in order to make the other files less convoluted.
Diffstat (limited to 'libexec/post-receive.d/01-git-export')
-rwxr-xr-xlibexec/post-receive.d/01-git-export22
1 files changed, 0 insertions, 22 deletions
diff --git a/libexec/post-receive.d/01-git-export b/libexec/post-receive.d/01-git-export
index 171f05f..37994e2 100755
--- a/libexec/post-receive.d/01-git-export
+++ b/libexec/post-receive.d/01-git-export
@@ -19,26 +19,4 @@ export PATH='/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin'
19 19
20prefix='/home/plugins' 20prefix='/home/plugins'
21 21
22#
23# Check whether the "test" branch of the "site.git" repository has been updated.
24#
25if [ "${PWD##*/}" = 'site.git' ]
26then
27 forty_zeros=$(printf '%.40d' '0')
28
29 while read old new ref
30 do
31 if [ "$ref" = 'refs/heads/test' ]
32 then
33 if [ "$new" != "$forty_zeros" ]
34 then
35 "$prefix/bin/git-export" -b 'test' "$PWD"
36 else
37 rm -rf "$prefix/exported/site-test"
38 fi
39 break
40 fi
41 done
42fi
43
44exec "$prefix/bin/git-export" "$PWD" 22exec "$prefix/bin/git-export" "$PWD"