summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--post-commit.tmpl8
1 files changed, 7 insertions, 1 deletions
diff --git a/post-commit.tmpl b/post-commit.tmpl
index ea90110..df441fa 100644
--- a/post-commit.tmpl
+++ b/post-commit.tmpl
@@ -1,6 +1,12 @@
#!/usr/bin/env bash
-remote_url = {{ mirror_url }}
+hook_active= {{ active }}
+remote_url= {{ mirror_url }}
+
+if [ "$hook_active" == false ]; the
+ echo 'Mirror push hook is not active!'
+ exit(-1);
+fi
if git ls-remote $remote_url; then
echo "mirro_foo" > /tmp/mirror_foo