From 3452e13f5e81c7fc30c9d874d07b38a61110fb79 Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Wed, 14 Jan 2015 19:37:22 -0500 Subject: [PATCH] Added locale generation to the installer --- install | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/install b/install index 803ad5f9e..4f7ee7ec1 100755 --- a/install +++ b/install @@ -244,7 +244,7 @@ if [ -f /etc/airtime/airtime.conf ]; then service airtime-liquidsoap stop-with-monit verbose "...Done" - echo "Existing Airtime installation detected. Your current /etc/airtime/airtime.conf\ + echo "Existing Airtime installation detected. Your current /etc/airtime/airtime.conf \ will be moved to /etc/airtime/airtime.conf.bak" # If we don't remove the existing python files in /usr/lib and the # /etc/init.d startup scripts, services won't work properly @@ -544,6 +544,28 @@ if [ "$install_dependencies" = "f" -a ${_i} -eq 1 ]; then fi fi +loud "\n-----------------------------------------------------" +loud " * Installing Locales * " +loud "-----------------------------------------------------" + +set +e +verbose "Generating locales" +for i in `ls /usr/share/airtime/locale | grep ".._.."`; do + if [ "$dist" = "Debian" ]; then + grep -qi "^$i" /etc/locale.gen + if [ $? -ne 0 ]; then + verbose "$i.UTF-8 UTF-8" >> /etc/locale.gen + fi + else + locale-gen "$i.utf8" + fi +done +set -e + +if [ "$dist" = "Debian" ]; then + /usr/sbin/locale-gen +fi + if [ "$install_dependencies" = "t" ]; then loud "\n-----------------------------------------------------" loud " * Installing External Dependencies * "