From e82ced1bd9d337e87c23b3c6a5e376630c788003 Mon Sep 17 00:00:00 2001 From: i-c-u-p <96894903+i-c-u-p@users.noreply.github.com> Date: Mon, 2 May 2022 06:21:33 +0000 Subject: [PATCH] shorten some seds --- easy-arch.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easy-arch.sh b/easy-arch.sh index c420aed..8682043 100755 --- a/easy-arch.sh +++ b/easy-arch.sh @@ -341,7 +341,7 @@ print "Generating a new fstab." genfstab -U /mnt >> /mnt/etc/fstab # Configure selected locale and console keymap -sed -i "s/^#$locale/$locale/" /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 @@ -453,7 +453,7 @@ EOF # Pacman eye-candy features. print "Enabling colours, animations, and parallel in pacman." -sed -i 's/^#Color$/Color\nILoveCandy/;s/^#ParallelDownloads.*/ParallelDownloads = 10/' /mnt/etc/pacman.conf +sed -Ei 's/^#(Color)$/\1\nILoveCandy/;s/^#(ParallelDownloads).*/\1 = 10/' /mnt/etc/pacman.conf # Enabling various services. print "Enabling Reflector, automatic snapshots, BTRFS scrubbing and systemd-oomd."