shithub: shithub

ref: 1a51231062636c8de1324d2fa1ffa573c2e04ef7
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>'
	}
}