configurable own for a git repo
[infrastructure.git] / scripts / git-check.sh
index ca3e738..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 ""