From f2009c4c76daf31cd008b6faee8b96abaacc7673 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Fri, 1 Jul 2011 21:31:16 -0300 Subject: [configs/releng] Re-generate locales only if needed. Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/build.sh | 1 + configs/releng/root-image/etc/locale.gen | 2 +- configs/releng/root-image/etc/rc.d/archiso | 10 ++++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 12e7636..d2923d9 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -30,6 +30,7 @@ make_customize_root_image() { mkdir -p ${work_dir}/root-image/etc/pacman.d wget -O ${work_dir}/root-image/etc/pacman.d/mirrorlist http://www.archlinux.org/mirrorlist/all/ sed -i "s/#Server/Server/g" ${work_dir}/root-image/etc/pacman.d/mirrorlist + chroot ${work_dir}/root-image /usr/sbin/locale-gen : > ${work_dir}/build.${FUNCNAME} fi } diff --git a/configs/releng/root-image/etc/locale.gen b/configs/releng/root-image/etc/locale.gen index ee50b2b..7e4e293 100644 --- a/configs/releng/root-image/etc/locale.gen +++ b/configs/releng/root-image/etc/locale.gen @@ -153,7 +153,7 @@ #en_PH ISO-8859-1 #en_SG.UTF-8 UTF-8 #en_SG ISO-8859-1 -#en_US.UTF-8 UTF-8 +en_US.UTF-8 UTF-8 #en_US ISO-8859-1 #en_ZA.UTF-8 UTF-8 #en_ZA ISO-8859-1 diff --git a/configs/releng/root-image/etc/rc.d/archiso b/configs/releng/root-image/etc/rc.d/archiso index 1429516..1bd315d 100755 --- a/configs/releng/root-image/etc/rc.d/archiso +++ b/configs/releng/root-image/etc/rc.d/archiso @@ -12,10 +12,12 @@ do_makeuser () do_locale_gen () { - stat_busy "Generating locales..." - sed -i "s/#\(${LOCALE/[@.]*}\)/\1/" /etc/locale.gen - /usr/sbin/locale-gen > /dev/null - stat_done + if [[ ${LOCALE} != "en_US.UTF-8" ]]; then + stat_busy "Generating locales..." + sed -i "s/#\(${LOCALE/[@.]*}\)/\1/" /etc/locale.gen + /usr/sbin/locale-gen > /dev/null + stat_done + fi } # If an alternate console was specified on the kernel command line, -- cgit v1.2.3-70-g09d2