Files
fedora-infra_ansible/roles/distgit/files/genacls.sh
Patrick Uiterwijk 2969d0d188 Lets first create all repos before creating ACLs for them
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2015-02-23 22:02:22 +00:00

19 lines
539 B
Bash

#!/bin/sh
python /usr/local/bin/pkgdb_sync_git_branches.py
TEMPDIR=`mktemp -d -p /var/tmp genacls.XXXXX`
export GL_BINDIR=/usr/bin
cd $TEMPDIR
# Only replace the acls if genacls completes successfully
if /usr/local/bin/genacls.pkgdb > gitolite.conf ; then
mv gitolite.conf /etc/gitolite/conf/
chown gen-acls:gen-acls -R /etc/gitolite/conf/
HOME=/srv/git /usr/bin/gitolite compile
fi
cd /
rm -rf $TEMPDIR
chown root:packager /etc/gitolite/conf/gitolite.conf-compiled.pm
chmod g+r /etc/gitolite/conf/gitolite.conf-compiled.pm