From ae2290e8354943c3b85c9d961facbcb2ca822ced Mon Sep 17 00:00:00 2001 From: oreo639 Date: Tue, 13 Sep 2022 10:22:19 -0700 Subject: [PATCH] base-files: don't overwrite existing locale and define default LANG Correct spelling of LC_IDENTIFICATION. --- srcpkgs/base-files/files/locale.sh | 17 +++++++++++++++-- srcpkgs/base-files/template | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/srcpkgs/base-files/files/locale.sh b/srcpkgs/base-files/files/locale.sh index 8486367bfabf90..92a8006a4e68c6 100644 --- a/srcpkgs/base-files/files/locale.sh +++ b/srcpkgs/base-files/files/locale.sh @@ -1,9 +1,22 @@ # Sets up locale system settings from /etc/locale.conf. # if [ -s /etc/locale.conf ]; then - . /etc/locale.conf + lines="" + while read -r line; do + line="${line%%#*}" + if expr "$line" : '^[[:space:]]*[A-Z_]\+=.*' > /dev/null; then + lines="$lines: \${$line} +" + else + lines="$lines$line +" + fi + done < /etc/locale.conf fi +# define default LANG to C.UTF-8 if not already defined +LANG="${LANG:-C.UTF-8}" + export LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY export LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT -export LC_INDENTIFICATION +export LC_IDENTIFICATION diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template index 64e756be34dee2..1877a88e14324e 100644 --- a/srcpkgs/base-files/template +++ b/srcpkgs/base-files/template @@ -1,7 +1,7 @@ # Template file for 'base-files' pkgname=base-files version=0.144 -revision=1 +revision=2 bootstrap=yes depends="xbps-triggers" short_desc="Void Linux base system files"