iexample.sh: add index-time.html, list sorted by time, fix reposdir '/' - 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 fd66a29d3ab2f226bc457cb4b3db63da8dff6bf0 /scm/stagit-gopher/commit/fd66a29d3ab2f226bc457cb4b3db63da8dff6bf0.gph bitreich.org 70
1parent 9a781328821c1e37987be5573114a6ff3b6e0ee6 /scm/stagit-gopher/commit/9a781328821c1e37987be5573114a6ff3b6e0ee6.gph bitreich.org 70
hAuthor: Hiltjo Posthuma URL:mailto:hiltjo@codemadness.org bitreich.org 70
iDate: Fri, 8 Jan 2016 13:39:23 +0100 Err bitreich.org 70
i Err bitreich.org 70
iexample.sh: add index-time.html, list sorted by time, fix reposdir '/' Err bitreich.org 70
i Err bitreich.org 70
iDiffstat: Err bitreich.org 70
i M example.sh | 20 ++++++++++++++++---- Err bitreich.org 70
i Err bitreich.org 70
i1 file changed, 16 insertions(+), 4 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@@ -14,16 +14,28 @@ Err bitreich.org 70
i Err bitreich.org 70
i set -e Err bitreich.org 70
i Err bitreich.org 70
i-reposdir="/var/www/domains/git.codemadness.nl/home/src/" Err bitreich.org 70
i+reposdir="/var/www/domains/git.codemadness.nl/home/src" Err bitreich.org 70
i curdir=$(pwd) Err bitreich.org 70
i Err bitreich.org 70
i # make index. Err bitreich.org 70
i cd "${reposdir}" Err bitreich.org 70
i-find . -maxdepth 1 -type d | grep -v "^.$" | sort | xargs stagit-index > "${curdir}/index.html" Err bitreich.org 70
i+find . -maxdepth 1 -type d | grep -v "^.$" | sort | xargs stagit-index | Err bitreich.org 70
i+ sed 's@| Last commit | @Last commit | @g' | \ Err bitreich.org 70
i+ sed 's@Name | @Name | @g' > "${curdir}/index.html" Err bitreich.org 70
i+ Err bitreich.org 70
i+# make index (sort by last commit author time). Err bitreich.org 70
i+find . -maxdepth 1 -type d | grep -v "^.$" | while read -r dir; do Err bitreich.org 70
i+ d=$(basename "${dir}") Err bitreich.org 70
i+ cd "${reposdir}/${d}" Err bitreich.org 70
i+ timestamp=$(git show -s --pretty="format:%at" || true) Err bitreich.org 70
i+ Err bitreich.org 70
i+ printf "%d %s\n" "${timestamp}" "${d}" Err bitreich.org 70
i+done | sort -n -k 1 | cut -f 2- -d ' ' | xargs stagit-index | \ Err bitreich.org 70
i+ sed 's@Last commit | @Last commit | @g' | \ Err bitreich.org 70
i+ sed 's@Name | @Name | @g' > "${curdir}/index-time.html" Err bitreich.org 70
i Err bitreich.org 70
i # make files per repo. Err bitreich.org 70
i find . -maxdepth 1 -type d | grep -v "^.$" | sort | while read -r dir; do Err bitreich.org 70
i- cd "${reposdir}" Err bitreich.org 70
i d=$(basename "${dir}") Err bitreich.org 70
i Err bitreich.org 70
i printf "%s..." "${d}" Err bitreich.org 70
i@@ -31,7 +43,7 @@ find . -maxdepth 1 -type d | grep -v "^.$" | sort | while read -r dir; do Err bitreich.org 70
i Err bitreich.org 70
i test -d "${d}" || mkdir -p "${d}" Err bitreich.org 70
i cd "${d}" Err bitreich.org 70
i- stagit "${reposdir}${d}" Err bitreich.org 70
i+ stagit "${reposdir}/${d}" Err bitreich.org 70
i Err bitreich.org 70
i printf " done\n" Err bitreich.org 70
i Err bitreich.org 70
.