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 daemon.uploadpack >& /dev/null || { git config daemon.uploadpack true; echo -n "uploadpack "; }
62 git config daemon.uploadarch >& /dev/null || { git config daemon.uploadarch true; echo -n "uploadarch "; }
63 git config hooks.mailinglist >& /dev/null || { git config hooks.mailinglist build@onelab.eu; echo -n "mailinglist "; }
64 git config hooks.announcelist >& /dev/null || { git config hooks.announcelist build@onelab.eu; echo -n "announcelist "; }
65 git config hooks.envelopesender >& /dev/null || { git config hooks.envelopesender build@onelab.eu; echo -n "envelopesender "; }
66 git config hooks.emailprefix >& /dev/null|| { git config hooks.emailprefix '[GIT]'; echo -n "emailprefix "; }
72 function check_hooks () {
73 echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx checking hooks "
75 # accept args like plcapi or plcapi.git
76 b=$(basename $arg .git)
79 # standard version is in /usr/share/doc/git-1.5.5.6/hooks/post-receive-email
80 (cd $git/hooks; [ -h post-receive ] || ln -sf /root/bin/post-receive-email-with-diffs post-receive )
87 [[ -z "$args" ]] && args=$(ls -d *.git)
88 fill_descriptions $args
89 check_permissions $args