Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two mutual exclusive options with xargs #1

Open
fabiomt opened this issue Mar 15, 2021 · 1 comment
Open

Two mutual exclusive options with xargs #1

fabiomt opened this issue Mar 15, 2021 · 1 comment

Comments

@fabiomt
Copy link

fabiomt commented Mar 15, 2021

Hi,

In the generate.sh script xargs was used with two options that are mutual exclusive (-L and -I) so the first one is ignored and have not effect at all, causing warnings on the build process.

Here's a little patch for this:

Index: x4d-icons/generate.sh
===================================================================
--- x4d-icons.orig/generate.sh
+++ x4d-icons/generate.sh
@@ -33,6 +33,6 @@ generate SVG 'TINY 1.2' svgtiny12
 generate XML '1.0' xml10
 generate XML '1.1' xml11
 
-/bin/ls Icons/*.svg | sed 's/-v\.svg//' | xargs -L1 -I{} convert -background none {}-v.svg {}.png
-/bin/ls Icons/*.svg | sed 's/-v\.svg//' | xargs -L1 -I{} convert -background none {}-v.svg {}.gif
-/bin/ls Icons/*.svg | sed 's/-v\.svg//' | xargs -L1 -I{} convert -background none {}-v.svg {}-v.eps
+/bin/ls Icons/*.svg | sed 's/-v\.svg//' | xargs -I{} convert -background none {}-v.svg {}.png
+/bin/ls Icons/*.svg | sed 's/-v\.svg//' | xargs -I{} convert -background none {}-v.svg {}.gif
+/bin/ls Icons/*.svg | sed 's/-v\.svg//' | xargs -I{} convert -background none {}-v.svg {}-v.eps
@fabiomt fabiomt changed the title Tow mutual exclusive options witch xargs Two mutual exclusive options witch xargs Mar 15, 2021
@fabiomt fabiomt changed the title Two mutual exclusive options witch xargs Two mutual exclusive options with xargs Mar 15, 2021
@xnox
Copy link
Owner

xnox commented Mar 15, 2021

Oh I see that

-I replace-str
              Replace occurrences of replace-str in the initial-arguments with names read from standard input.  Also, unquoted blanks do not terminate input items; instead the  sepa‐
              rator is the newline character.  Implies -x and -L 1.

that -L 1 is already implied. Oh well, i use -L1 -I{} all over the place in things i write.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants