summaryrefslogtreecommitdiff
path: root/post-receive.tmpl
blob: 1904182f3425e2e7d96ff389899a2babe0b1f0ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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