[configs/releng] Re-generate locales only if needed.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
Gerardo Exequiel Pozzi 2011-07-01 21:31:16 -03:00
parent 4090ba6260
commit f2009c4c76
3 changed files with 8 additions and 5 deletions

View File

@ -30,6 +30,7 @@ make_customize_root_image() {
mkdir -p ${work_dir}/root-image/etc/pacman.d 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/ 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 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} : > ${work_dir}/build.${FUNCNAME}
fi fi
} }

View File

@ -153,7 +153,7 @@
#en_PH ISO-8859-1 #en_PH ISO-8859-1
#en_SG.UTF-8 UTF-8 #en_SG.UTF-8 UTF-8
#en_SG ISO-8859-1 #en_SG ISO-8859-1
#en_US.UTF-8 UTF-8 en_US.UTF-8 UTF-8
#en_US ISO-8859-1 #en_US ISO-8859-1
#en_ZA.UTF-8 UTF-8 #en_ZA.UTF-8 UTF-8
#en_ZA ISO-8859-1 #en_ZA ISO-8859-1

View File

@ -12,10 +12,12 @@ do_makeuser ()
do_locale_gen () do_locale_gen ()
{ {
stat_busy "Generating locales..." if [[ ${LOCALE} != "en_US.UTF-8" ]]; then
sed -i "s/#\(${LOCALE/[@.]*}\)/\1/" /etc/locale.gen stat_busy "Generating locales..."
/usr/sbin/locale-gen > /dev/null sed -i "s/#\(${LOCALE/[@.]*}\)/\1/" /etc/locale.gen
stat_done /usr/sbin/locale-gen > /dev/null
stat_done
fi
} }
# If an alternate console was specified on the kernel command line, # If an alternate console was specified on the kernel command line,