From f8ec8488eda7f5cae108d7149c7523ce8fb28435 Mon Sep 17 00:00:00 2001 From: TessaiMusa <49408514+TessaiMusa@users.noreply.github.com> Date: Wed, 20 Oct 2021 21:22:30 +0530 Subject: [PATCH] Added parallel download support --- archfi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/archfi b/archfi index 4a28830..dc9db48 100644 --- a/archfi +++ b/archfi @@ -740,6 +740,7 @@ installmenu(){ #options+=("${txtselectmirrorsbycountry}" "(${txtoptional})") options+=("${txteditmirrorlist}" "(${txtoptional})") options+=("${txtfiltermirrorlist}" "reflector") + outputs+=("Parallel downloads of packages" "") options+=("${txtinstallarchlinux}" "pacstrap") options+=("${txtconfigarchlinux}" "") sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallmenu}" --menu "" --cancel-button "${txtunmount}" --default-item "${nextitem}" 0 0 0 \ @@ -764,6 +765,17 @@ installmenu(){ nextitem="${txtconfigarchlinux}" 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) + if [ "$?" = "0" ]; then + if [[ "$numpkg" =~ '^[1-9][0-9]*$' ]] ; then + echo "ParallelDownloads = ${numpkg}" >> /etc/pacman.conf + else + echo 'Please enter number greater 0' + pressanykey + fi + fi + ;; "${txtconfigarchlinux}") archmenu nextitem="${txtconfigarchlinux}"