source: trunk/packages/invirt-dev/invirt-configure-git-hooks

Last change on this file was 3038, checked in by gdb, 14 years ago

Added git hooks to invirt-dev package

  • Property svn:executable set to *
File size: 405 bytes
Line 
1#!/bin/sh
2
3set -e
4set -u
5
6link_to() {
7    rm -rf "$1"
8    ln -s "$2" "$1"
9}
10
11package_base=/srv/git/invirt
12hook_base=/usr/share/invirt-dev/git-hooks
13
14link_to "$package_base/packages.git/hooks" "$hook_base/super"
15
16for 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
21done
Note: See TracBrowser for help on using the repository browser.