summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlestofante2019-10-09 22:10:19 +0200
committerlestofante2019-10-09 22:10:19 +0200
commit2c9f47236e24d1389c5afa7fe4353ebcc2067125 (patch)
tree951b6d83135b70542bb5c063d69ce549499d0c7a
parentfa2af98bb3a7531ad8a1e42d3d4881ec0ed114db (diff)
downloadaur-2c9f47236e24d1389c5afa7fe4353ebcc2067125.tar.gz
added agressive timeout to aria2
-rw-r--r--PKGBUILD4
-rwxr-xr-xpp.sh7
2 files changed, 6 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d138ee7af16f..0ea50a1587a0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: lesto <lestofante88@gmail.com>
pkgname=pacman-parallelizer
-pkgver=6
+pkgver=7
pkgrel=1
pkgdesc="A minimal package downloader for pacman, using aria2"
arch=(any)
@@ -8,7 +8,7 @@ url="https://github.com/lestofante/PacmanParallelizer"
license=('GPL3')
depends=('aria2' 'pacman-contrib')
source=("pp.sh")
-md5sums=('773509405b5da7d79a3fb6985e35836d')
+md5sums=('366163f7c8af9dd5b8e89e75e430810c')
build() {
cd "$srcdir"
diff --git a/pp.sh b/pp.sh
index 2d9329b74aa0..f3cdaf00a50c 100755
--- a/pp.sh
+++ b/pp.sh
@@ -46,7 +46,7 @@ for pkgNameAndVersion in "${packageList[@]}"; do
fi
done
- aria2c -c $downloadList -d "$pacmanCahceDir" &> /dev/null &
+ aria2c -c $downloadList --connect-timeout=1 -s $maxMirrorForDownload -t 1 -d "$pacmanCahceDir" &> /dev/null &
pidTmp=($!)
pidToWait+=($pidTmp)
pidToWaitStr+=" $pidTmp"
@@ -61,11 +61,12 @@ for pkgNameAndVersion in "${packageList[@]}"; do
done
#now wait for all remaining jobs
-echo "all download started, waiting for completition ${pidToWaitStr}"
+echo "all download started, waiting for completition of pids: ${pidToWaitStr}"
for pid in "${pidToWait[@]}"; do
+ echo "waiting for pid $pid"
wait $pid
- # do something when a job completes
+ echo "$pid completed"
done
if [[ $# -gt 0 ]]; then