ref: c5847bcde2ed8d1e5891e79b186a14e46cfa0bfa
dir: /info/
#!/bin/rc . /sys/lib/shithub/common.rc cd $1 shift rfork ne nl=' ' gituser=$1 repo=$2 refname=HEAD repons $gituser $repo repodir=/mnt/$repo/.git if(! ref=`{resolveref $refname}){ echo '<b>invalid ref '$refname'</b>' exit } if(test -f $gitfs/$ref/hash) hash=`{cat $gitfs/$ref/hash} if not hash=$ref http_response user_prelude $gituser $repo $hash echo ' <h3>Clone</h3> <div> <b>clone:</b> git://'$host/$gituser/$repo' gits://'$host/$gituser/$repo'<br> <b>push:</b> hjgit://'$host/$gituser/$repo'<br>' if(test -f $repodir/contact) echo ' <b>patches to: </b>'^`$nl{cat $repodir/contact}^'<br>' echo ' </div>' if(test -f $gitfs/object/$hash/msg){ echo ' <h3>Last commit</h3>' formatcommit $gituser $repo $hash } cd $gitfs/object/$hash/tree echo ' <h3>About</h3> <pre id="desc">' if(test -f $repodir/README) htcat $repodir/README if not if(test -f README) htcat README if not if (test -f README.md) htcat README.md if not if(test -f $repodir/desc) htcat $repodir/desc if not if(test -f $repodir/description) htcat $repodir/description if not echo 'this repo has no description' echo ' </pre> </body> </html> '