CC-4797: Generate localization locales on install

-check if locale exists before writing it to /etc/locale.gen on Debian
This commit is contained in:
denise 2013-01-15 16:29:02 -05:00
parent aef19aadbe
commit 7442f91a5d
1 changed files with 4 additions and 1 deletions

View File

@ -11,7 +11,10 @@ dist=`lsb_release -is`
echo "Generating locales"
for i in `ls /usr/share/airtime/locale | grep ".._.."`; do
if [ "$dist" = "Debian" ]; then
echo "$i.UTF-8 UTF-8" >> /etc/locale.gen
grep -q "$i" /etc/locale.gen
if [ $? -ne 0 ]; then
echo "$i.UTF-8 UTF-8" >> /etc/locale.gen
fi
else
locale-gen "$i.utf8"
fi