summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pacman2pacman-get10
1 files changed, 7 insertions, 3 deletions
diff --git a/pacman2pacman-get b/pacman2pacman-get
index e8c454e..581c793 100644
--- a/pacman2pacman-get
+++ b/pacman2pacman-get
@@ -31,9 +31,13 @@ torrent_folder='/srv/pacman2pacman/torrents'
pkg_cache_location='/var/cache/pacman/pkg'
-prog_check_freq=1.4 # seconds to update downlaod progress
+prog_check_freq=1.4 # seconds to update download progress
-stall_time='60' # if download is still at 0% after this much time, check webseed is alive
+torrent_search_time=6 # seconds to spend scanning the mirrors for a torrent
+
+# These variables to be moved into a config file
+mirrorlist_location="/etc/pacman.d/mirrorlist"
+stall_time=60 # if download is still at 0% after this much time, consider download stalled
# Pacman2pacman should be called like this from /etc/pacman.conf:
# XferCommand = /usr/bin/pacman2pacman-get %u %o
@@ -116,7 +120,7 @@ else
look_for_torrent "${torrent_url}" &
- done < <(grep '^Server \?= \?' "/etc/pacman.d/mirrorlist" | shuf | head -n 3)
+ done < <(grep '^Server \?= \?' "mirrorlist_location" | shuf | head -n 3)
# Get the name of the torrent downloaded
read -t 6 response < <(cat "${fifoname}")