Skip to content

Commit 0dfec29

Browse files
crassDaniel Kiper
authored andcommitted
bootstrap: Migrate linguas.sh into bootstrap.conf
Bootstrap has infrastructure 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> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1 parent 8a6ea7a commit 0dfec29

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

bootstrap.conf

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ checkout_only_file=
6363
copy=true
6464
vc_ignore=
6565

66-
SKIP_PO=n
67-
6866
# Build prerequisites
6967
buildreq="\
7068
autoconf 2.64
@@ -109,9 +107,23 @@ bootstrap_post_import_hook () {
109107
bootstrap_epilogue () {
110108
mv INSTALL.grub INSTALL
111109

112-
# Update translation files and create LINGUAS file used to determine
113-
# the set of languages used to translate.
114-
if [ "x$SKIP_PO" = "xn" ]; then
115-
./linguas.sh
110+
if [ "x$SKIP_PO" = "x" ]; then
111+
# Generate LINGUAS with all supported languages. Bootstrap will
112+
# generate a LINGUAS, but it will not contain the autogenerated
113+
# languages.
114+
autogenerated="en@quot en@hebrew de@hebrew en@cyrillic en@greek en@arabic en@piglatin de_CH"
115+
116+
for x in $autogenerated; do
117+
rm -f "po/$x.po";
118+
done
119+
120+
(
121+
(
122+
cd po && ls *.po| cut -d. -f1
123+
for x in $autogenerated; do
124+
echo "$x";
125+
done
126+
) | sort | uniq | xargs
127+
) >po/LINGUAS
116128
fi
117129
}

0 commit comments

Comments
 (0)