diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-02-25 15:51:15 +0100 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-02-26 11:27:43 +0100 |
commit | 3bd2b660ff550e3eddea5b4b113ee79cf66e0f7f (patch) | |
tree | 2b1ee9d230ae4c5e76617e7979c174b5015accfb /support | |
parent | 02b960c988acdc9e1ced6438e5c8778c1b938034 (diff) | |
download | gitlab-shell-3bd2b660ff550e3eddea5b4b113ee79cf66e0f7f.tar.gz |
Make support/rewrite-hooks.sh use bin/create_hooks
Diffstat (limited to 'support')
-rwxr-xr-x | support/rewrite-hooks.sh | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/support/rewrite-hooks.sh b/support/rewrite-hooks.sh index 3c96b6f..585eaeb 100755 --- a/support/rewrite-hooks.sh +++ b/support/rewrite-hooks.sh @@ -1,28 +1,5 @@ #!/bin/bash +# This script is deprecated. Use bin/create-hooks instead. -# $1 is an optional argument specifying the location of the repositories directory. -# Defaults to /home/git/repositories if not provided - -home_dir="/home/git" -src=${1:-"$home_dir/repositories"} - -function create_link_in { - ln -s -f "$home_dir/gitlab-shell/hooks/update" "$1/hooks/update" -} - -for dir in `ls "$src/"` -do - if [ -d "$src/$dir" ]; then - if [[ "$dir" =~ ^.*\.git$ ]] - then - create_link_in "$src/$dir" - else - for subdir in `ls "$src/$dir/"` - do - if [ -d "$src/$dir/$subdir" ] && [[ "$subdir" =~ ^.*\.git$ ]]; then - create_link_in "$src/$dir/$subdir" - fi - done - fi - fi -done +gitlab_shell_dir="$(cd $(dirname $0) && pwd)/.." +exec ${gitlab_shell_dir}/bin/create-hooks |