aboutsummaryrefslogtreecommitdiffstats
#!/bin/sh

# determine our domain
# NOTE: preferably hardcode the domain in your script, or use another env var
domain="${ACIT_MAIL_DOMAIN:-example.com}"
if [ -n "${ACIT_USES_ALIASES}" ]; then
	domain="${domain#bugs.}"
fi
domain="git.$domain"

# read project list
while read -r name; do
	printf "%s\thttps://%s/%s\n" "$name" "$domain" "$name"
done <<LIST
nocat
acit
work/cgit
softfork/cgit
LIST

:<<-DOC
For this example we use a hardcoded list. In production you're adviced
to use eg gitolite's project list that it exposes and cgit also reads.
example:

while read -r name; do
	# do magic
done </var/lib/git/projects.list

Of course you may use another language than bash, as long as you output
as a line per project, each line the projectname, a tab, the url for this
project.

DOC