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.
2 files changed, 2 insertions(+), 2 deletions(-) | |||
---|---|---|---|
M | example_create.sh | +1 | -1 |
M | example_post-receive.sh | +1 | -1 |
1@@ -30,7 +30,7 @@ for dir in "${reposdir}/"*/; do
2 printf "%s... " "${d}"
3
4 mkdir -p "${curdir}/${d}"
5- cd "${curdir}/${d}"
6+ cd "${curdir}/${d}" || continue
7 stagit -c ".cache" "${reposdir}/${r}"
8
9 # symlinks
M · example_post-receive.sh
+1, -11@@ -14,7 +14,7 @@ export LC_CTYPE="en_US.UTF-8"
2
3 name="$1"
4 if test "${name}" = ""; then
5- name=$(basename $(pwd))
6+ name=$(basename "$(pwd)")
7 fi
8
9 # config