-
-
Save oreo639/850ddb140df502781f1f54fc1ffaba0c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sets up locale system settings from /etc/locale.conf. | |
# | |
_localevars="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" | |
for a in $_localevars; do | |
eval '_backup_'${a}'="$'${a}'"' | |
done | |
if [ -s /etc/locale.conf ]; then | |
. /etc/locale.conf | |
fi | |
for a in $_localevars; do | |
eval 'if [ -n "$_backup_'${a}'" ]; then | |
'${a}'="$_backup_'${a}'" | |
fi' | |
unset "_backup_${a}" | |
done | |
# define default LANG to C.UTF-8 if not already defined | |
LANG="${LANG:-C.UTF-8}" | |
export $_localevars | |
unset _localevars a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment