[PATCH v2 3/4] bootstrap: Condense and simplify LINGUAS generation

Glenn Washburn <[email protected]>
Newsgroups org.gnu.grub-devel
Message-ID <b9bbe64cd8b85d52fa94b740026991b0528289d6.1762844371.git.development@efficientek.com>
Remove unnecessary subshells. Loop over autogenerated po files only once.
Use existing LINGUAS created by bootstrap instead of finding po files
again.

Signed-off-by: Glenn Washburn <[email protected]>
---
 bootstrap.conf | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index 79d4248c84aa..7104692d43ea 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -113,17 +113,12 @@ bootstrap_epilogue () {
     # languages.
     autogenerated="en@quot en@hebrew de@hebrew en@cyrillic en@greek en@arabic en@piglatin de_CH"
 
-    for x in $autogenerated; do
-      rm -f "po/$x.po";
-    done
-
-    (
-      (
-        cd po && ls *.po| cut -d. -f1
-        for x in $autogenerated; do
-            echo "$x";
-        done
-      ) | sort | uniq | xargs
-    ) >po/LINGUAS
+    {
+      ls po/*.po | xargs -L 100 basename -s .po -a
+      for x in $autogenerated; do
+        rm -f "po/$x.po"
+        echo "$x"
+      done
+    } | sort | uniq | xargs >po/LINGUAS
   fi
 }
-- 
2.34.1


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.