logo

etc_portage

Unnamed repository; edit this file 'description' to name the repository. git clone https://hacktivis.me/git/etc_portage.git

0005-fix-issues-in-example-scripts.patch (1149B)


  1. From 587b01428d6ec2be1ab6b468198663118d483990 Mon Sep 17 00:00:00 2001
  2. From: Hiltjo Posthuma <hiltjo@codemadness.org>
  3. Date: Fri, 1 Mar 2019 11:49:29 +0100
  4. Subject: [PATCH 05/22] fix issues in example scripts
  5. - in case cd fails don't continue (don't write in previous directory).
  6. - post-receive: quote $(pwd) in case it has spaces.
  7. found by shellcheck tool.
  8. ---
  9. example_create.sh | 2 +-
  10. example_post-receive.sh | 2 +-
  11. 2 files changed, 2 insertions(+), 2 deletions(-)
  12. diff --git a/example_create.sh b/example_create.sh
  13. index aff7d54..cf16e1d 100755
  14. --- a/example_create.sh
  15. +++ b/example_create.sh
  16. @@ -30,7 +30,7 @@ for dir in "${reposdir}/"*/; do
  17. printf "%s... " "${d}"
  18. mkdir -p "${curdir}/${d}"
  19. - cd "${curdir}/${d}"
  20. + cd "${curdir}/${d}" || continue
  21. stagit -c ".cache" "${reposdir}/${r}"
  22. # symlinks
  23. diff --git a/example_post-receive.sh b/example_post-receive.sh
  24. index 0655569..c9bcb5e 100755
  25. --- a/example_post-receive.sh
  26. +++ b/example_post-receive.sh
  27. @@ -14,7 +14,7 @@ export LC_CTYPE="en_US.UTF-8"
  28. name="$1"
  29. if test "${name}" = ""; then
  30. - name=$(basename $(pwd))
  31. + name=$(basename "$(pwd)")
  32. fi
  33. # config
  34. --
  35. 2.26.2