configurable own for a git repo
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 15 Jun 2015 14:48:51 +0000 (16:48 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 15 Jun 2015 14:48:51 +0000 (16:48 +0200)
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 ""