#!/bin/rc . /sys/lib/shithub/common.rc cd $1shift rfork nenl='' gituser=$1repo=$2refname=$3filename=$repo^'-'^`{date -f 'YYYYMMDD-hhmm'}^'.tgz' repons $gituser $repoif(! ref=`{resolveref $refname}){ echo '<b>invalid ref '$refname'</b>' exit}bind $gitfs/$ref/tree /mnt/$repocd /mnthttp_response 'application/x-gzip' $filenametar c $repo | gzip -n
#!/bin/rc
. /sys/lib/shithub/common.rc
cd $1
shift
rfork ne
nl='
'
gituser=$1
repo=$2
refname=$3
filename=$repo^'-'^`{date -f 'YYYYMMDD-hhmm'}^'.tgz'
repons $gituser $repo
if(! ref=`{resolveref $refname}){
echo '<b>invalid ref '$refname'</b>'
exit
}
bind $gitfs/$ref/tree /mnt/$repo
cd /mnt
http_response 'application/x-gzip' $filename
tar c $repo | gzip -n