void-packages icon indicating copy to clipboard operation
void-packages copied to clipboard

common/environment/setup/install.sh: fix v* funcs for paths with spaces

Open classabbyamp opened this issue 1 year ago • 1 comments

also quote, fix tabs, and shellcheck the file

revival of #42850

re: @Chocimier's comment:

How about pushing setting IFS down to cp call? We may need word splitting later on for vsv's LN_OPTS.

this does not work, it still splits the arguments if done at that level. also, LN_OPTS is a single word (either -s or -sf).

Testing the changes

  • I tested the changes in this PR: YES

can be tested with, e.g.:

diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index 1b5d674c14a..50e5b113e0a 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -21,6 +21,9 @@ pre_build() {
                _date="$(date --utc --date "@$SOURCE_DATE_EPOCH" "+%Y-%m-%d")"
                go_ldflags+=" -X main.date=${_date}"
        fi
+       mkdir "foo bar"
+       for i in 1 2 3 4 5; do touch "foo bar/idk$i.bleh"; done
+       for i in 1 2 3 4 5; do touch "foo bar/ok$i.bleh"; done
 }
 
 do_check() {
@@ -28,8 +31,16 @@ do_check() {
 }
 
 post_install() {
+       vmkdir "foo bar"
+       vcopy "foo bar/*.bleh" "foo bar"
        vlicense LICENSE
        vcompletion completions/chezmoi-completion.bash bash
        vcompletion completions/chezmoi.fish fish
        vcompletion completions/chezmoi.zsh zsh
 }
+
+chezmoi-stuff_package() {
+       pkg_install() {
+               vmove "foo bar/ok*"
+       }
+}

classabbyamp avatar Feb 12 '24 19:02 classabbyamp

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

github-actions[bot] avatar May 13 '24 01:05 github-actions[bot]

Found while updating Clojure, there are two templates (that I could find) using space to supply multiple sources - the other one being mathjax2.

icp1994 avatar Aug 06 '24 06:08 icp1994

just split it into a loop or glob

classabbyamp avatar Aug 06 '24 06:08 classabbyamp