hhvn.uk

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

stagit-gopher-create.rc (636B)


      1 #!/bin/rc
      2 
      3 d = `$nl{realpath `$nl{dirname $0}}
      4 
      5 # Add my dir to $path
      6 # This script should still be able to 
      7 # run if the binaries aren't installed.
      8 path = ($path $d/stagit-gopher)
      9 
     10 reposdir  = $d/../git
     11 repos     = $reposdir/*
     12 gopherdir = $d/../gopher
     13 stagitdir = /git/
     14 destdir   = $gopherdir ^ $stagitdir
     15 
     16 stagit-gopher-index -b $stagitdir $repos > $destdir/index.gph
     17 
     18 # Make repos
     19 for (repo in $repos) {
     20 	display = `$nl{basename $repo '.git'}
     21 	dest    = $destdir ^ $display
     22 
     23 	printf '%s... ' $display
     24 	@{
     25 		mkdir -p $dest
     26 		cd $dest
     27 		stagit-gopher -b $stagitdir/$display -l 75 $repo
     28 		ln -sf log.gph index.gph
     29 	}
     30 	printf 'done\n'
     31 }