diff options
author | Joseph Graham <joseph@xylon.me.uk> | 2017-06-22 08:31:51 +0100 |
---|---|---|
committer | Joseph Graham <joseph@xylon.me.uk> | 2017-06-22 08:31:51 +0100 |
commit | e704be65c4d8df9906e1a715c0ab58986a520be0 (patch) | |
tree | ed083d6cc97a72135ed1ca9d0a9b1f77a4796b7f | |
parent | ee1f4b4b578f42a173478df074e6cafc69072a7a (diff) |
Tidied up variables in preperation for moving them into a config file.
-rw-r--r-- | pacman2pacman-get | 10 |
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}") |