archlinux: remove quotes when checking system locales (in case it has been user defined)

This commit is contained in:
Olivier MEDOC 2015-12-08 15:32:30 +01:00
parent 7d2bc0c6bb
commit 33aa1782ca

View File

@ -135,7 +135,8 @@ EOF
echo "LANG=en_US.UTF-8" >> /etc/locale.conf
fi
# ... and make sure it is really generated
current_locale=`grep LANG /etc/locale.conf|cut -f 2 -d =`
# This line is buggy as LANG can be set to LANG="en_US.UTF-8". The Quotes must be stripped
current_locale=`grep LANG /etc/locale.conf|cut -f 2 -d = | tr -d '"'`
if [ -n "$current_locale" ] && ! locale -a | grep -q "$current_locale"; then
base=`echo "$current_locale" | cut -f 1 -d .`
charmap=`echo "$current_locale.UTF-8" | cut -f 2 -d .`