7 gitwebfiles="git-favicon.png git-logo.png gitweb.cgi gitweb.css"
11 for file in $gitwebfiles; do gitwebpattern="${gitwebpattern}|$file" ; done
12 gitwebpattern=$(echo "$gitwebpattern" | sed -e 's,|,,')
14 function missing_gitweb () {
16 echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx missing in gitweb (for web)"
17 for i in $gitwebfiles; do
22 echo -n "MISSING.. " ;
30 function fill_descriptions () {
31 echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx checking descriptions "
33 # accept args like plcapi or plcapi.git
34 b=$(basename $arg .git)
37 grep -q Unnamed $git/description && { echo -n $i "Setting.. "; echo $b > $git/description ; }
42 function update_server_info () {
43 echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx updating server info "
45 # accept args like plcapi or plcapi.git
46 b=$(basename $arg .git)
50 git update-server-info
56 function check_permissions () {
57 echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx checking permissions "
59 # accept args like plcapi or plcapi.git
60 b=$(basename $arg .git)
63 if [ -f $git/owner ] ; then owner=$(cat $git/owner); fi
64 echo -n "$git ($owner) "
71 function check_configs () {
72 echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx checking config (upload*, hooks...) "
74 # accept args like plcapi or plcapi.git
75 b=$(basename $arg .git)
79 git config core.bare true; echo -n "bare ";
80 git config core.sharedrepository >& /dev/null || { git config core.sharedrepository true; echo -n "sharedrepository "; }
81 git config daemon.uploadpack >& /dev/null || { git config daemon.uploadpack true; echo -n "uploadpack "; }
82 git config daemon.uploadarch >& /dev/null || { git config daemon.uploadarch true; echo -n "uploadarch "; }
83 (git config hooks.mailinglist|grep $MLIST) >& /dev/null || { git config hooks.mailinglist $MLIST; echo -n "mailinglist "; }
84 (git config hooks.announcelist|grep $MLIST) >& /dev/null || { git config hooks.announcelist $MLIST; echo -n "announcelist "; }
85 (git config hooks.envelopesender|grep $MLIST) >& /dev/null || { git config hooks.envelopesender $MLIST; echo -n "envelopesender "; }
86 git config hooks.emailprefix >& /dev/null || { git config hooks.emailprefix ''; echo -n "emailprefix "; }
92 function check_hooks () {
93 echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx checking hooks "
95 # accept args like plcapi or plcapi.git
96 b=$(basename $arg .git)
99 # standard version is in /usr/share/doc/git-1.5.5.6/hooks/post-receive-email
100 (cd $git/hooks; cp -f /root/bin/post-receive-email-with-diffs post-receive; chmod 755 post-receive )
107 [[ -z "$args" ]] && args=$(ls -d *.git)
108 fill_descriptions $args
109 update_server_info $args
110 check_permissions $args