blob: 82518f20de1f7bcfe5de37d850e29a3d46d00725 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/sh -eu
set -eu
REPOS="/data/git/*.git"
HOOKS="pre-receive"
dir=`dirname $0`
BASE=`realpath $dir`
for hook in $HOOKS; do
for git in $REPOS; do
if [ -d "$git" ]; then
cd $git
echo `basename $git`
chown -R www:www .
find . -type f -print0 | xargs -0 chmod 660
find . -type d -print0 | xargs -0 chmod 770
ln -sf $BASE/$hook hooks/$hook
git config core.sharedRepository=0660 || true
git config receive.denyNonFastforwards=true || true
touch git-daemon-export-ok
fi
done
done
|