public inbox for grub-devel@gnu.org
 help / color / mirror / Atom feed
From: Glenn Washburn <development@efficientek.com>
To: grub-devel@gnu.org
Cc: Daniel Kiper <dkiper@net-space.pl>,
	Mike Gilbert <floppym@gentoo.org>,
	Glenn Washburn <development@efficientek.com>
Subject: [PATCH v2 2/4] bootstrap: Migrate linguas.sh into bootstrap.conf
Date: Tue, 11 Nov 2025 01:13:27 -0600	[thread overview]
Message-ID: <7ffeeb59590378b58ee51f8a0b043bbd4e0bca58.1762844371.git.development@efficientek.com> (raw)
In-Reply-To: <cover.1762844371.git.development@efficientek.com>

Bootstrap has infrustructure for downloading/updating project po files
and generating the LINGUAS file. It uses wget instead of rsync, but
provides the same functionality, namely that only po files that have a
modification date before the corresponding one on the server will get
redownloaded. Bootstrap creates a pristine copy of the po files in
po/.reference, so update .gitignore to ignore that directory.

Bootstrap also creates the po/LINGUAS file, but it does not know to add
in GRUB's autogenerated po files. So move that code from linguas.sh into
the bootstrap epilogue.

Signed-off-by: Glenn Washburn <development@efficientek.com>
---
 bootstrap.conf | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index e894666fd252..79d4248c84aa 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -63,8 +63,6 @@ checkout_only_file=
 copy=true
 vc_ignore=
 
-SKIP_PO=n
-
 # Build prerequisites
 buildreq="\
 autoconf   2.64
@@ -109,9 +107,23 @@ bootstrap_post_import_hook () {
 bootstrap_epilogue () {
   mv INSTALL.grub INSTALL
 
-  # Update translation files and create LINGUAS file used to determine
-  # the set of languages used to translate.
-  if [ "x$SKIP_PO" = "xn" ]; then
-    ./linguas.sh
+  if [ "x$SKIP_PO" = "x" ]; then
+    # Generate LINGUAS with all supported languages. Bootstrap will
+    # generate a LINGUAS, but it will not contain the autogenerated
+    # 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
   fi
 }
-- 
2.34.1


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

  parent reply	other threads:[~2025-11-11  7:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-11  7:13 [PATCH v2 0/4] Improve generating of LINGUAS Glenn Washburn
2025-11-11  7:13 ` [PATCH v2 1/4] bootstrap: Run linguas.sh in bootstrap epilogue Glenn Washburn
2025-11-11  7:13 ` Glenn Washburn [this message]
2025-11-11  7:13 ` [PATCH v2 3/4] bootstrap: Condense and simplify LINGUAS generation Glenn Washburn
2025-11-17 17:29   ` Daniel Kiper
2025-11-17 19:35     ` Glenn Washburn
2025-11-18 12:43       ` Daniel Kiper
2025-11-11  7:13 ` [PATCH v2 4/4] INSTALL: Fix a grammatical error Glenn Washburn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ffeeb59590378b58ee51f8a0b043bbd4e0bca58.1762844371.git.development@efficientek.com \
    --to=development@efficientek.com \
    --cc=dkiper@net-space.pl \
    --cc=floppym@gentoo.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox