I need to run a script that will generate the projects.list file when a new repository is created by one the members of my team.
We develop firmware that branch off from a 'master', but the branches will never be merged back into master. Since there will never be a merge back I decided to make repositories for every distinct version of firmware. I have developed a bash script that will create the projects.list file for me.
find repositories/ -iname "*.git" -type d | grep --invert-match "gitolite-admin" | sed 's/repositories\///g' > /srv/git/projects.list
Now I am having trouble creating the hook to call that script.
I have tried getting gitolite to generate the file for me but have had no luck with it. Any help is appreciated. Thanks!
Answer
In config/gitolite.conf I made the repo def look like this:
repo Firmware/[a-zA-Z0-9].*/[a-zA-Z0-9].*
C = @all
RW+ = @all
R = gitweb
config gitweb.owner = Repo Manager