1 From: Matthew Wilcox <matthew@wil.cx>
2 To: 383219@bugs.debian.org
3 Cc: Roland Mas <lolando@debian.org>
4 Subject: index.aux generation
5 Date: Thu, 24 Aug 2006 08:55:10 -0600
7 Alioth needs to generate an index.aux file. It'd be helpful if we had
8 an example script for doing this. Here's the script used for
9 git.infradead.org (MIT licence, says its author):
15 for a in * ; do [ -r $a/public_git ] && [ ! -d /home/git/users/$a ] && ln -s /home/$a/public_git /home/git/users/$a ; done
18 find . -name 'HEAD' | grep ^[-./=+a-zA-Z0-9]*\$ | sed s:/HEAD\$:: | while read DIR ; do
19 TREEUID=`stat -c %U $DIR`
20 TREEUSERNAME=`grep ^$TREEUID: /etc/passwd | cut -f5 -d: | sed s/\ /+/`
21 if [ "$TREEUSERNAME" = "" ]; then
24 echo $DIR $TREEUSERNAME | sed s:/:%2F:g
25 done > /home/git/.index.aux.$$
27 mv /home/git/.index.aux.$$ /home/git/.index.aux
31 I suspect Alioth wants something like (untested ...)
33 cd /srv/git.debian.org/git
34 ls */*/HEAD | grep ^[-./=+a-zA-Z0-9]*\$ | sed s:/HEAD\$:: | while read DIR ; do
35 TREEUID=`stat -c %U $DIR`
37 if [ "$TREEUSERNAME" = "" ]; then
40 echo $DIR $TREEUSERNAME | sed s:/:%2F:g
41 done > /srv/git.debian.org/.index.aux.$$
43 mv /srv/git.debian.org/.index.aux.$$ /srv/git.debian.org/.index.aux
45 where XXX would be how to turn a username into the name of a user.
46 I dunno how Alioth works; ldap or postgres db seem plausible answers.