Added parallel download support

This commit is contained in:
TessaiMusa 2021-10-20 21:22:30 +05:30
parent 04ec79a37e
commit f8ec8488ed

12
archfi
View file

@ -740,6 +740,7 @@ installmenu(){
#options+=("${txtselectmirrorsbycountry}" "(${txtoptional})") #options+=("${txtselectmirrorsbycountry}" "(${txtoptional})")
options+=("${txteditmirrorlist}" "(${txtoptional})") options+=("${txteditmirrorlist}" "(${txtoptional})")
options+=("${txtfiltermirrorlist}" "reflector") options+=("${txtfiltermirrorlist}" "reflector")
outputs+=("Parallel downloads of packages" "")
options+=("${txtinstallarchlinux}" "pacstrap") options+=("${txtinstallarchlinux}" "pacstrap")
options+=("${txtconfigarchlinux}" "") options+=("${txtconfigarchlinux}" "")
sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallmenu}" --menu "" --cancel-button "${txtunmount}" --default-item "${nextitem}" 0 0 0 \ sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallmenu}" --menu "" --cancel-button "${txtunmount}" --default-item "${nextitem}" 0 0 0 \
@ -764,6 +765,17 @@ installmenu(){
nextitem="${txtconfigarchlinux}" nextitem="${txtconfigarchlinux}"
fi 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}") "${txtconfigarchlinux}")
archmenu archmenu
nextitem="${txtconfigarchlinux}" nextitem="${txtconfigarchlinux}"