From 669517bad92235dd166747df048f27f14a5d9d48 Mon Sep 17 00:00:00 2001 From: Jane Doe Date: Fri, 17 May 2024 18:22:09 +0000 Subject: [PATCH] Changes to the 'makepkgd.conf' drop-in file for 'makepkg' that optimizes the building process (only applicable to KDE Plasma Custom & Gnome Custom Setups). Changed the way "reflector" presents the Countries list, before obtaining the available mirrors. --- Amelia.sh | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/Amelia.sh b/Amelia.sh index 3f4f6b2..2a19f1a 100644 --- a/Amelia.sh +++ b/Amelia.sh @@ -1,7 +1,7 @@ #!/bin/bash # Amelia Installer -# Version: 4.2 +# Version: 4.3 set -euo pipefail trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR @@ -3643,8 +3643,6 @@ ${purple}###${nc} LUKS Encryption ${purple}###${nc} opt_pcmn (){ local prompt="PacMan" - countries="$(reflector --list-countries | sed 's|[0-9].*||' | sed 's|-.*||' | sed 's|Country.*||')" - list=(${countries}) sleep 0.5 NC " _______________________ @@ -3653,16 +3651,15 @@ ${purple}###${nc} Optimize PacMan ${purple}###${nc} " YELLOW " - > Select a country for your Arch Mirrors: - - " - for countries in "${list[*]}"; do - echo "${countries}" - done + > Select a Country for your Arch Mirrors: + + + ### [Hit ${nc}'l'${yellow} to list Countries, then ${nc}'down'${yellow} to search or ${nc}'q'${yellow} to quit] " BLUE " -Enter country name or code ${bwhite}(Empty for Defaults)${blue}: " + +Enter country name or country code ${bwhite}(Empty for Defaults)${blue}: " read -r -p " ==> " COUNTRY echo @@ -3673,10 +3670,14 @@ Enter country name or code ${bwhite}(Empty for Defaults)${blue}: " ==> [${green}Default Mirrors OK${nc}] " + elif [[ "${COUNTRY}" == "l" ]]; then + reflector --list-countries | more + return 1 + elif [[ -n "${COUNTRY}" ]] ; then NC " " - if reflector --verbose -c "${COUNTRY}" -l 10 -p https -f 10 --sort rate --save /etc/pacman.d/mirrorlist; then + if reflector --verbose -c "${COUNTRY}" -l 10 -p https -f 10 --sort rate --save /etc/pacman.d/mirrorlist 2>/dev/null; then sleep 0.5 NC " @@ -4268,7 +4269,8 @@ NRG BUILDENV=(!distcc color ccache check !sign) OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto) COMPRESSGZ=(pigz -c -f -n) - COMPRESSBZ2=(pbzip2 -c -f)' | tee /etc/makepkg.conf.d/makepkgd.conf && + COMPRESSBZ2=(pbzip2 -c -f) + COMPRESSZST=(zstd -c -T0 --ultra -20 --auto-threads=logical -)' | tee /etc/makepkg.conf.d/makepkgd.conf && ln -sf /usr/share/zoneinfo/$(curl -s http://ip-api.com/line?fields=timezone) /etc/localtime && hwclock --systohc && echo ${HOSTNAME} > /etc/hostname && @@ -4461,7 +4463,8 @@ NRG BUILDENV=(!distcc color ccache check !sign) OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto) COMPRESSGZ=(pigz -c -f -n) - COMPRESSBZ2=(pbzip2 -c -f)' | tee /etc/makepkg.conf.d/makepkgd.conf && + COMPRESSBZ2=(pbzip2 -c -f) + COMPRESSZST=(zstd -c -T0 --ultra -20 --auto-threads=logical -)' | tee /etc/makepkg.conf.d/makepkgd.conf && ln -sf /usr/share/zoneinfo/$(curl -s http://ip-api.com/line?fields=timezone) /etc/localtime && hwclock --systohc && echo ${HOSTNAME} > /etc/hostname &&