shithub: shithub

ref: 84f77d5a1673c5e2579c4d63d4062957753d91f0
dir: /usr/

View raw version
#!/bin/rc -e

. /sys/lib/shithub/common.rc

cd $1
shift

usr=$1
shift

rfork ne
nl='
'

prelude '' 'the fragrant git host'
echo '<img src="/static/'$logo'" /><br/>'

echo '<h2>'^$usr^'</h2>'
if(test -f $usr/desc.html)
	cat $usr/desc.html
if not if(test -f $usr/desc){
	echo '<pre>'
	htcat $usr/desc
	echo '</pre>'
}

udir=()
for(repo in `$nl{ls $usr/}){
	name=`{basename $repo}
	if(test -e $repo/.git/webpublish){
		echo '<dt><a href="/'$repo'/HEAD/info.html">'$name'</a></dt>'
		echo '<dd>'
		if(test -f $repo/.git/desc)
			htcat $repo/.git/desc
		if not if(test -f $repo/.git/description)
			htcat $repo/.git/description
		if not
			echo 'probably some code'
		echo '</dd>'
	}
}