From 7aae2a2ebe85f3f5f41b5d2998d9c6daf6ed1cfa Mon Sep 17 00:00:00 2001 From: i-c-u-p <96894903+i-c-u-p@users.noreply.github.com> Date: Tue, 7 Jun 2022 12:57:59 +0000 Subject: [PATCH] sed changes improve locale.gen searching sed and make locale uncommenting sed more specific --- easy-arch.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easy-arch.sh b/easy-arch.sh index b5b2fc4..f43e0e4 100755 --- a/easy-arch.sh +++ b/easy-arch.sh @@ -211,7 +211,7 @@ locale_selector () { '') locale="en_US.UTF-8" info_print "$locale will be the default locale." return 0;; - '/') sed -E '/^# +|^#$/d;s/^#| *$//g;s/ .*/ (Charset:&)/' /etc/locale.gen | less -M + '/') sed -E '/^#( +|$)/d;s/^#| *$//g;s/ .*/ (Charset:&)/' /etc/locale.gen | less -M clear return 1;; *) if ! grep -q "^#\?$(sed 's/[].*[]/\\&/g' <<< $locale) " /etc/locale.gen; then @@ -363,7 +363,7 @@ info_print "Generating a new fstab." genfstab -U /mnt >> /mnt/etc/fstab # Configure selected locale and console keymap -sed -i "/^#$locale/s/^#//" /mnt/etc/locale.gen +sed -i "/^#$locale /s/^#//" /mnt/etc/locale.gen echo "LANG=$locale" > /mnt/etc/locale.conf echo "KEYMAP=$kblayout" > /mnt/etc/vconsole.conf @@ -479,4 +479,4 @@ done # Finishing up. info_print "Done, you may now wish to reboot (further changes can be done by chrooting into /mnt)." -exit \ No newline at end of file +exit