hhvn.uk

Website, gopher, etc
git clone https://hhvn.uk/hhvn.uk
git clone git://hhvn.uk/hhvn.uk
Log | Files | Refs | Submodules

stagit-create.rc (479B)


      1 #!/bin/rc
      2 
      3 me = `$nl{realpath `$nl{dirname $0}}
      4 path = ($path $me/stagit)
      5 
      6 repos = $me/../git
      7 web = $me/../www
      8 
      9 mkdir -p $web
     10 
     11 stagit-index $repos/* > $web ^ '/index.html'
     12 
     13 for (d in $repos/*) {
     14 	base = `{basename $d}
     15 	repo = `{dirname $d}
     16 	d = `$nl{realpath $d}
     17 
     18 	printf '%s... ' $base
     19 
     20 	mkdir -p $web ^ '/' ^ $base
     21 	@{
     22 		cd $web ^ '/' ^ $base
     23 		stagit -c '.cache' -u 'git://hhvn.uk/' ^ $base $d
     24 
     25 		ln -sf log.html index.html
     26 		ln -sf ../index.css style.css
     27 	}
     28 	
     29 	echo 'done'
     30 }