summaryrefslogtreecommitdiff
path: root/libre-testing/filesystem/locale.sh
diff options
context:
space:
mode:
authorBruno Cichon <ebrasca@librepanther.com>2018-10-01 01:51:03 +0200
committerBruno Cichon <ebrasca@librepanther.com>2018-10-01 01:51:03 +0200
commit56f955aca6231693fe797de4793f77ed58ab116e (patch)
tree17daeabce98174f288bab94b47961dc9e9931e66 /libre-testing/filesystem/locale.sh
parent75ff40baa049bae7e9270d20ef86a88b733006ab (diff)
Add some base packages for ppc64le
Diffstat (limited to 'libre-testing/filesystem/locale.sh')
-rw-r--r--libre-testing/filesystem/locale.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/libre-testing/filesystem/locale.sh b/libre-testing/filesystem/locale.sh
new file mode 100644
index 000000000..48dd748da
--- /dev/null
+++ b/libre-testing/filesystem/locale.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# load locale.conf in XDG paths.
+# /etc/locale.conf loads and overrides by kernel command line is done by systemd
+# But we override it here, see FS#56688
+if [ -z "$LANG" ]; then
+ if [ -n "$XDG_CONFIG_HOME" ] && [ -r "$XDG_CONFIG_HOME/locale.conf" ]; then
+ . "$XDG_CONFIG_HOME/locale.conf"
+ elif [ -n "$HOME" ] && [ -r "$HOME/.config/locale.conf" ]; then
+ . "$HOME/.config/locale.conf"
+ elif [ -r /etc/locale.conf ]; then
+ . /etc/locale.conf
+ fi
+fi
+
+# define default LANG to C if not already defined
+LANG=${LANG:-C}
+
+# export all locale (7) variables when they exist
+export 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