From 7f1b9c3aab4177ee19626dcac83af72d796b3cdf Mon Sep 17 00:00:00 2001 From: TessaiMusa <49408514+TessaiMusa@users.noreply.github.com> Date: Wed, 20 Oct 2021 22:07:04 +0530 Subject: [PATCH] Fixed critical bugs --- archfi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/archfi b/archfi index dc9db48..e8089ff 100644 --- a/archfi +++ b/archfi @@ -740,7 +740,7 @@ installmenu(){ #options+=("${txtselectmirrorsbycountry}" "(${txtoptional})") options+=("${txteditmirrorlist}" "(${txtoptional})") options+=("${txtfiltermirrorlist}" "reflector") - outputs+=("Parallel downloads of packages" "") + options+=("Parallel downloads of packages" "(${txtoptional})") options+=("${txtinstallarchlinux}" "pacstrap") options+=("${txtconfigarchlinux}" "") sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallmenu}" --menu "" --cancel-button "${txtunmount}" --default-item "${nextitem}" 0 0 0 \ @@ -766,10 +766,10 @@ installmenu(){ fi ;; "Parallel downloads of packages") - numpkg=$(whiptail --backtitle "${apptitle}" --title "Number of packages to download at once" --inputbox "" 0 0 "archlinux" 3>&1 1>&2 2>&3) + numpkg=$(whiptail --backtitle "${apptitle}" --title "Number of packages to download at once" --inputbox "" 0 0 "5" 3>&1 1>&2 2>&3) if [ "$?" = "0" ]; then - if [[ "$numpkg" =~ '^[1-9][0-9]*$' ]] ; then - echo "ParallelDownloads = ${numpkg}" >> /etc/pacman.conf + if [[ "$numpkg" =~ ^[1-9][0-9]*$ ]] ; then + sed -i "'s/ParallelDownloads/ParallelDownloads = ' ${numpkg}" >> /etc/pacman.conf else echo 'Please enter number greater 0' pressanykey