Use user's locale.gen instead of sed-magic

The sed-magic was wrong in many cases, including my default locale:
LANG=en_US.utf8
locale.gen line: en_US.UTF-8

If we copy the user's locale.gen file, we will generate all of their locales
instead of just the current one.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2007-11-28 14:05:05 -06:00
parent 0986936143
commit f7ab112f9a
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ else
cp /etc/resolv.conf "${working_dir}/etc/resolv.conf"
echo "generating default locales"
sed -i "s|^#\(.*$LANG\)|\1|g" "${working_dir}/etc/locale.gen"
cp /etc/locale.gen "${working_dir}/etc/locale.gen"
chroot "${working_dir}" locale-gen
if [ ! -e "${working_dir}/.arch-chroot" ]; then