diff mbox series

[bug#48749] bootstrap: Simplify seach for translation languages.

Message ID 5e05990e1a70357456366b2075f1a3d185f4375f.1622400777.git.h.goebel@crazy-compilers.com
State Accepted
Headers show
Series [bug#48749] bootstrap: Simplify seach for translation languages. | expand

Commit Message

Hartmut Goebel May 30, 2021, 6:53 p.m. UTC
Extend the sed script to also behave like "basename",
saving the addtional call of "xargs basename".

* bootstrap (langs): Extend sed scripts, remove running xargs.
---
 bootstrap | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Ludovic Courtès June 8, 2021, 9:08 p.m. UTC | #1
Hi,

Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> Extend the sed script to also behave like "basename",
> saving the addtional call of "xargs basename".
>
> * bootstrap (langs): Extend sed scripts, remove running xargs.

LGTM!  (Modulo typo in the subject line.)

Thanks,
Ludo’.
Hartmut Goebel June 13, 2021, 6:48 p.m. UTC | #2
Thanks for pointing to th typo :-)

Pushed as bd02e50a02ceed914135dba1e69e4457e489cf86
diff mbox series

Patch

diff --git a/bootstrap b/bootstrap
index a47269d87f..de024aeaa5 100755
--- a/bootstrap
+++ b/bootstrap
@@ -5,8 +5,7 @@  set -e -x
 
 # Generate stubs for translations.
 langs=`find po/doc -type f -name 'guix-manual*.po' \
-        | sed -e 's,guix-manual\.,,' \
-        | xargs -n 1 -I{} basename {} .po`
+        | sed -e 's,.*/guix-manual\.,,;s,\.po$,,'`
 for lang in ${langs}; do
     if [ ! -e "doc/guix.${lang}.texi" ]; then
 	echo "@setfilename guix.${lang}.info" > "doc/guix.${lang}.texi"
@@ -16,8 +15,7 @@  for lang in ${langs}; do
     fi
 done
 langs=`find po/doc -type f -name 'guix-cookbook*.po' \
-        | sed -e 's,guix-cookbook\.,,' \
-        | xargs -n 1 -I{} basename {} .po`
+        | sed -e 's,.*/guix-cookbook\.,,;s,\.po$,,'`
 for lang in ${langs}; do
     if [ ! -e "doc/guix-cookbook.${lang}.texi" ]; then
 	echo "@setfilename guix-cookbook.${lang}.info" > "doc/guix-cookbook.${lang}.texi"