summaryrefslogtreecommitdiff
path: root/www/generate/src/stagit
blob: 0506e0ee09feefce493a7bea8ac4e629ef452413 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/rc

domain = $1
if (~ $domain ()) {
	domain = `hostname
}

gitdir = /var/git
wwwdir = /var/www/htdocs/src.$domain

stagit-index $gitdir/* > $wwwdir/index.html

for (repo in $gitdir/*) {
	base = `{basename $repo}
	echo GEN src.$domain $base

	mkdir -p $wwwdir/$base
	cd $wwwdir/$base
	stagit -c .cache -u 'https://src.$domain/'$base $repo
	if (!test -e index.html) {
		ln -s log.html index.html
	}
}