diff options
author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-08-01 13:57:53 +0200 |
---|---|---|
committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-08-01 13:57:53 +0200 |
commit | 375c8da8d9ec99c2e62ebf4492b936f01e83393c (patch) | |
tree | ad3b36669f56e63f39c6e199196cafc2ffc5b9a3 /post-receive.tmpl | |
parent | f905e09ade90b9d8a047b24204f82f6b9bb08407 (diff) |
Diffstat (limited to 'post-receive.tmpl')
-rw-r--r-- | post-receive.tmpl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/post-receive.tmpl b/post-receive.tmpl new file mode 100644 index 0000000..1904182 --- /dev/null +++ b/post-receive.tmpl @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +hook_active= {{ active }} +remote_url= {{ mirror_url }} + +if [ "$hook_active" == false ]; then + echo 'Mirror push hook is not active!' + exit -1 +fi + +if git ls-remote $remote_url; then + echo "mirro_foo" > /tmp/mirror_foo +else + echo "mirror_bat" > /tmp/mirror_baz +fi |