#!/bin/rc -e . /sys/lib/shithub/common.rc cd $1 shift cache=/usr/web/cache/shitlist.cache tcache=/usr/web/cache/shitlist.cache.tmp.$pid if(test -e $cache && ! test $cache -older 1m){ exec cat $cache exit } rfork ne nl=' ' { prelude '' 'the fragrant git host' echo '
' if(~ $#intro 0) echo '

Repositories


' if not echo $intro udir=() for(repo in `$nl{ls */ >[2]/dev/null || echo}){ ndir=`{basename -d $repo} if(! ~ $udir $ndir) echo '' if(! ~ $udir $ndir){ echo '

'$ndir'

' echo '
' udir=$ndir } if(test -e $repo/.git/webpublish){ echo '
'$repo'
' echo '
' 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 '
' } } } > $tcache && mv $tcache $cache cat $cache