mk: export locales much earlier

also simplify the way it works (eval and awk)

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-09-12 08:49:53 +01:00
parent 6a2e9a7919
commit 798cc79399
2 changed files with 5 additions and 18 deletions
-18
View File
@@ -5,24 +5,6 @@
# Copyright (c) 2020-2026 Leah Rowe <leah@libreboot.org>
# Copyright (c) 2025 Alper Nebi Yasak <alpernebiyasak@gmail.com>
utf_8="C.UTF-8"
export LANG="$utf_8"
export LANGUAGE="$utf_8"
export LC_CTYPE="$utf_8"
export LC_NUMERIC="$utf_8"
export LC_TIME="$utf_8"
export LC_COLLATE="$utf_8"
export LC_MONETARY="$utf_8"
export LC_MESSAGES="$utf_8"
export LC_PAPER="$utf_8"
export LC_NAME="$utf_8"
export LC_ADDRESS="$utf_8"
export LC_TELEPHONE="$utf_8"
export LC_MEASUREMENT="$utf_8"
export LC_IDENTIFICATION="$utf_8"
export LC_ALL="$utf_8"
projectname="libreboot"
projectsite="https://libreboot.org/"
+5
View File
@@ -7,6 +7,11 @@
set -u -e
eval "`printf "%s\n" "LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE \
LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE \
LC_MEASUREMENT LC_IDENTIFICATION LC_ALL" | \
awk '{ for (i=1; i<=NF; i++) $i = "export " $i "=C.UTF-8;"; print }'`"
(
xbarg0="$0"
[ "${xbarg0##*/}" = "$xbarg0" ] && \