|
|
fix issues in example scripts - stagit-gopher - static git page generator for gopher |
|
|
 |
git clone git://git.codemadness.org/stagit-gopher (git://git.codemadness.org) |
|
|
 |
Log |
|
|
 |
Files |
|
|
 |
Refs |
|
|
 |
README |
|
|
 |
LICENSE |
|
|
|
--- |
|
|
 |
commit 77bfd42fb3c139ada3a679a62c56f6eebd38a0c2 |
|
|
 |
parent 5a8540c7f9ec50f9fe1b5f163ccfa2d0e5ed5c0b |
|
|
 |
Author: Hiltjo Posthuma <hiltjo@codemadness.org> (mailto://) |
application/vnd.lotus-organizer |
|
|
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(-) |
|
|
|
--- |
|
|
 |
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 |
|
|
 |
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 |
|