From 798cc7939933720bfa580e07d5cde2446e9ca681 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 12 Sep 2026 08:49:53 +0100 Subject: [PATCH] mk: export locales much earlier also simplify the way it works (eval and awk) Signed-off-by: Leah Rowe --- include/init.sh | 18 ------------------ mk | 5 +++++ 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/include/init.sh b/include/init.sh index 52e87a6c..70c6591f 100644 --- a/include/init.sh +++ b/include/init.sh @@ -5,24 +5,6 @@ # Copyright (c) 2020-2026 Leah Rowe # Copyright (c) 2025 Alper Nebi Yasak -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/" diff --git a/mk b/mk index 61c0020b..cea6c943 100755 --- a/mk +++ b/mk @@ -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" ] && \