Home
fix issues in example scripts - stagit-gopher - A git gopher frontend. (mirror) HTML git clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 77bfd42fb3c139ada3a679a62c56f6eebd38a0c2 DIR parent 5a8540c7f9ec50f9fe1b5f163ccfa2d0e5ed5c0b HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Fri, 1 Mar 2019 11:50:45 +0100 fix issues in example scripts - in case cd fails don't continue (don't write in previous directory). - post-receive: quote $(pwd) in case it has spaces. found by shellcheck tool. Diffstat: M example_create.sh | 2 +- M example_post-receive.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- DIR diff --git a/example_create.sh b/example_create.sh @@ -31,7 +31,7 @@ for dir in "${reposdir}/"*/; do printf "%s... " "${d}" mkdir -p "${destdir}/${d}" - cd "${destdir}/${d}" + cd "${destdir}/${d}" || continue stagit-gopher -b "${stagitdir}/${d}" -c ".cache" "${reposdir}/${r}" # symlinks DIR diff --git a/example_post-receive.sh b/example_post-receive.sh @@ -14,7 +14,7 @@ export LC_CTYPE="en_US.UTF-8" name="$1" if test "${name}" = ""; then - name=$(basename $(pwd)) + name=$(basename "$(pwd)") fi # config