configurable own for a git repo
[infrastructure.git] / scripts / git-check.sh
index fe559c9..ef395ed 100755 (executable)
@@ -59,8 +59,10 @@ function check_permissions () {
        # accept args like plcapi or plcapi.git
        b=$(basename $arg .git)
        git=${b}.git
-       echo -n "$git "
-       chown -R root:onelab $git
+       owner=root:onelab
+       if [ -f $git/owner ] ; then owner=$(cat $git/owner); fi
+       echo -n "$git ($owner) "
+       chown -R $owner $git
        chmod -R g+w,o-w $git
     done
     echo ""
@@ -74,6 +76,7 @@ function check_configs () {
        git=${b}.git
        echo -n "$git "
        cd $git 
+        git config core.bare true; echo -n "bare ";
        git config core.sharedrepository >& /dev/null || { git config core.sharedrepository true; echo -n "sharedrepository "; }
        git config daemon.uploadpack >& /dev/null || { git config daemon.uploadpack true; echo -n "uploadpack "; }
        git config daemon.uploadarch >& /dev/null || { git config daemon.uploadarch true; echo -n "uploadarch "; }