Commit f7ab112f authored by Dan McGee's avatar Dan McGee
Browse files

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: default avatarDan McGee <dan@archlinux.org>
parent 09869361
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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