iimprove example: strip .git suffix - stagit-gopher - A git gopher frontend. (mirror) Err bitreich.org 70 hgit clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/ URL:git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/ bitreich.org 70 1Log /scm/stagit-gopher/log.gph bitreich.org 70 1Files /scm/stagit-gopher/files.gph bitreich.org 70 1Refs /scm/stagit-gopher/refs.gph bitreich.org 70 1Tags /scm/stagit-gopher/tag bitreich.org 70 1README /scm/stagit-gopher/file/README.gph bitreich.org 70 1LICENSE /scm/stagit-gopher/file/LICENSE.gph bitreich.org 70 i--- Err bitreich.org 70 1commit 44a49f51db565cbfc31f31393d8dcdec1cdc8167 /scm/stagit-gopher/commit/44a49f51db565cbfc31f31393d8dcdec1cdc8167.gph bitreich.org 70 1parent 837427b09ea3a592e9b364b180c2011b517ab2c8 /scm/stagit-gopher/commit/837427b09ea3a592e9b364b180c2011b517ab2c8.gph bitreich.org 70 hAuthor: Hiltjo Posthuma URL:mailto:hiltjo@codemadness.org bitreich.org 70 iDate: Sun, 29 May 2016 13:06:32 +0200 Err bitreich.org 70 i Err bitreich.org 70 iimprove example: strip .git suffix Err bitreich.org 70 i Err bitreich.org 70 istagit-index and stagit strip the .git suffix so also strip it from the Err bitreich.org 70 idirectory for the possible www root. Err bitreich.org 70 i Err bitreich.org 70 iThanks to ng0 for reporting it! Err bitreich.org 70 i Err bitreich.org 70 iDiffstat: Err bitreich.org 70 i M example.sh | 5 +++-- Err bitreich.org 70 i Err bitreich.org 70 i1 file changed, 3 insertions(+), 2 deletions(-) Err bitreich.org 70 i--- Err bitreich.org 70 1diff --git a/example.sh b/example.sh /scm/stagit-gopher/file/example.sh.gph bitreich.org 70 i@@ -22,12 +22,13 @@ find . -maxdepth 1 -type d | grep -v "^.$" | sort | xargs stagit-index > "${curd Err bitreich.org 70 i # make files per repo. Err bitreich.org 70 i cd "${reposdir}" Err bitreich.org 70 i find . -maxdepth 1 -type d | grep -v "^.$" | sort | while read -r dir; do Err bitreich.org 70 i- d=$(basename "${dir}") Err bitreich.org 70 i+ r=$(basename "${dir}") Err bitreich.org 70 i+ d=$(basename "${dir}" ".git") Err bitreich.org 70 i printf "%s... " "${d}" Err bitreich.org 70 i Err bitreich.org 70 i mkdir -p "${curdir}/${d}" Err bitreich.org 70 i cd "${curdir}/${d}" Err bitreich.org 70 i- stagit -c ".cache" "${reposdir}/${d}" Err bitreich.org 70 i+ stagit -c ".cache" "${reposdir}/${r}" Err bitreich.org 70 i Err bitreich.org 70 i # symlinks Err bitreich.org 70 i ln -sf log.html index.html Err bitreich.org 70 .