bootstrap: Simplify search for translation languages.
authorHartmut Goebel <h.goebel@crazy-compilers.com>
Sun, 30 May 2021 17:29:04 +0000 (19:29 +0200)
committerHartmut Goebel <h.goebel@crazy-compilers.com>
Sun, 13 Jun 2021 18:46:01 +0000 (20:46 +0200)
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

index a47269d..de024ae 100755 (executable)
--- 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"