5 gitwebfiles="git-favicon.png git-logo.png gitweb.cgi gitweb.css"
9 for file in $gitwebfiles; do gitwebpattern="${gitwebpattern}|$file" ; done
10 gitwebpattern=$(echo "$gitwebpattern" | sed -e 's,|,,')
12 function missing_gitweb () {
14 echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx missing in gitweb (for web)"
15 for i in $gitwebfiles; do
20 echo -n "MISSING.. " ;
28 function fill_descriptions () {
29 echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx checking descriptions "
31 # accept args like plcapi or plcapi.git
32 b=$(basename $arg .git)
35 grep -q Unnamed $git/description && { echo -n $i "Setting.. "; echo $b > $git/description ; }
40 function check_permissions () {
41 echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx checking permissions "
43 # accept args like plcapi or plcapi.git
44 b=$(basename $arg .git)
47 chown -R root:onelab $git
53 function check_configs () {
54 echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx checking config (upload*, hooks...) "
56 # accept args like plcapi or plcapi.git
57 b=$(basename $arg .git)
61 git config core.sharedrepository >& /dev/null || { git config core.sharedrepository true; echo -n "sharedrepository "; }
62 git config daemon.uploadpack >& /dev/null || { git config daemon.uploadpack true; echo -n "uploadpack "; }
63 git config daemon.uploadarch >& /dev/null || { git config daemon.uploadarch true; echo -n "uploadarch "; }
64 git config hooks.mailinglist >& /dev/null || { git config hooks.mailinglist git@onelab.eu; echo -n "mailinglist "; }
65 git config hooks.announcelist >& /dev/null || { git config hooks.announcelist git@onelab.eu; echo -n "announcelist "; }
66 git config hooks.envelopesender >& /dev/null || { git config hooks.envelopesender git@onelab.eu; echo -n "envelopesender "; }
67 git config hooks.emailprefix >& /dev/null || { git config hooks.emailprefix ''; echo -n "emailprefix "; }
73 function check_hooks () {
74 echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx checking hooks "
76 # accept args like plcapi or plcapi.git
77 b=$(basename $arg .git)
80 # standard version is in /usr/share/doc/git-1.5.5.6/hooks/post-receive-email
81 (cd $git/hooks; cp -f /root/bin/post-receive-email-with-diffs post-receive )
88 [[ -z "$args" ]] && args=$(ls -d *.git)
89 fill_descriptions $args
90 check_permissions $args