~mil/mepo-devel

mepo: Drop usage of non-standard xargs flag v1 APPLIED

Hugo Osvaldo Barrera: 1
 Drop usage of non-standard xargs flag

 1 files changed, 2 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~mil/mepo-devel/patches/53820/mbox | git am -3
Learn more about email & git

[PATCH mepo] Drop usage of non-standard xargs flag Export this patch

A single usage of xargs relies on the -d flag, which is specific
to gnu findutils and not available in other xargs implementations
(e.g.: busybox, bsd, etc).

Drop this flag by simply replacing newlines in the input stream.

This drops findutils as a dependency.
---
 scripts/mepo_ui_helper_menu.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/mepo_ui_helper_menu.sh b/scripts/mepo_ui_helper_menu.sh
index 55f1047..2f6c3a5 100755
--- a/scripts/mepo_ui_helper_menu.sh
+++ b/scripts/mepo_ui_helper_menu.sh
@@ -46,7 +46,8 @@ inputzenity() {
    OPTS="$(printf %b "$OPTS" | tr -d \" | awk NF)"
    RESULT="$(
      echo "$OPTS" |
      xargs -d"\\n" zenity $(zenitydims 0.8 0.8) --title "Select an entry" --list --column=Selection --text "$PROMPT"
      tr '\n' '\0' |
      xargs -0 zenity $(zenitydims 0.8 0.8) --title "Select an entry" --list --column=Selection --text "$PROMPT"
    )"
    if [ "$RESULT" = "Type Custom" ]; then
      TEXTINPUT=1 inputzenity
-- 
2.45.2