stagit-gopher

static git page generator for gopher
git clone git://git.2f30.org/stagit-gopher.git
Log | Files | Refs | README | LICENSE

commit 60eefdd22bc7d6b1a48b00906eb1d94e7322d9ea
parent 5012d76a0494d9afa62840159e2a58e33af2c814
Author: Quentin Rameau <quinq@fifth.space>
Date:   Sat,  1 Jul 2017 14:45:34 +0200

Arrange prefix path handling in example.sh

This makes it easier to handle the gopher dir and it's relative
stagit-gopher path.

Diffstat:
example.sh | 14++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/example.sh b/example.sh @@ -11,11 +11,13 @@ # - sh example.sh # path must be absolute. -reposdir="/var/www/domains/git.codemadness.nl/home/src" -curdir=$(pwd) +reposdir="/var/scm/git" +gopherdir="/var/gopher" +stagitdir="/scm" +destdir="${gopherdir}/${stagitdir}" # make index. -stagit-gopher-index "${reposdir}/"*/ > "${curdir}/index.gph" +stagit-gopher-index -b "${stagitdir}" "${reposdir}/"*/ > "${destdir}/index.gph" # make files per repo. for dir in "${reposdir}/"*/; do @@ -24,9 +26,9 @@ for dir in "${reposdir}/"*/; do d=$(basename "${dir}" ".git") printf "%s... " "${d}" - mkdir -p "${curdir}/${d}" - cd "${curdir}/${d}" - stagit-gopher -b "/${d}" -c ".cache" "${reposdir}/${r}" + mkdir -p "${destdir}/${d}" + cd "${destdir}/${d}" + stagit-gopher -b "${stagitdir}/${d}" -c ".cache" "${reposdir}/${r}" # symlinks ln -sf log.gph index.gph