From d4d5b9842af55347716b92e75a99828132393002 Mon Sep 17 00:00:00 2001 From: Lisa Marie Maginnis Date: Mon, 6 Oct 2014 13:42:59 -0400 Subject: [PATCH] update hook --- deploy-hooks.git/post-update | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy-hooks.git/post-update b/deploy-hooks.git/post-update index d73acc5..1c2638c 100755 --- a/deploy-hooks.git/post-update +++ b/deploy-hooks.git/post-update @@ -1,7 +1,7 @@ #!/bin/bash unset GIT_DIR -SELF=deploy_hooks.git +SELF=deploy-hooks.git REPO_DIR=$HOME/repositories CHECKOUT_DIR=$HOME/local/checkouts/deploy-hooks @@ -17,7 +17,7 @@ esac echo "Updating local checkout..." if [ ! -d $CHECKOUT_DIR ]; then - git clone $REPO_DIR/$self $CHECKOUT_DIR + git clone $REPO_DIR/$SELF $CHECKOUT_DIR git checkout stable else cd $CHECKOUT_DIR @@ -25,8 +25,8 @@ else fi echo "Syncing hooks..." -for working_copy in $(find $CHECKOUT_DIR -type d -maxdepth 1 -name '*git'); do - rsync -avrSPX --delete $working_copy/hooks/* $REPO_DIR/{$working_copy//*\//}/hooks/ +for working_copy in $(find $CHECKOUT_DIR -maxdepth 1 -name '*.git' -type d | grep -v '/.git'); do + rsync -avrSPX --delete $working_copy/* $REPO_DIR/${working_copy//*\//}/hooks/ done exec git update-server-info -- 2.25.1