Remove stray 'not' in builder.py
[invirt/packages/invirt-dev.git] / invirt-configure-git-hooks
1 #!/bin/sh
2
3 set -e
4 set -u
5
6 link_to() {
7     rm -rf "$1"
8     ln -s "$2" "$1"
9 }
10
11 package_base=/srv/git/invirt
12 hook_base=/usr/share/invirt-dev/git-hooks
13
14 link_to "$package_base/packages.git/hooks" "$hook_base/super"
15
16 for pkg in "$package_base"/*/*.git; do
17     case "$pkg" in
18         "$package_base"/packages/*.git) link_to "$pkg/hooks" "$hook_base/sub" ;;
19         *) link_to "$pkg/hooks" "$hook_base/other" ;;
20     esac
21 done