wowana.me

website source; use git clone git://wowana.me/wowana.me.git to clone this repository.


gitindex (586B)


      1 #!/bin/sh
      2 
      3 : "${MARKDOWN:=markdown}"
      4 
      5 git_root=/var/lib/git
      6 repos="$(ssh sakamoto find "$git_root" -type d -name '*.git')"
      7 
      8 for repopath in $repos; do
      9 	repo="${repopath#"$git_root/"}"
     10 	repo="${repo%.git}"
     11 	mkdir -p "out/git/$repo.git"
     12 	$MARKDOWN <src/git.inc >src/git.part.xht
     13 	scripts/postproc src/git.part.xht |
     14 		sed "s@%reponame%@$repo@g" >"out/git/$repo.git/index.xht"
     15 done
     16 
     17 printf %s "$repos" | sort |
     18 	sed 's@^'"$git_root"'/\(.*\)$@- [\1](/git/\1)@; 1i # git\n' |
     19 	$MARKDOWN > src/git-index.md.tmp
     20 scripts/postproc src/git-index.md.tmp >out/git/index.xht
     21 rm src/git-index.md.tmp