summaryrefslogtreecommitdiff
path: root/pacman2pacman-get
diff options
context:
space:
mode:
authorJoseph Graham <joseph@xylon.me.uk>2017-06-22 08:13:14 +0100
committerJoseph Graham <joseph@xylon.me.uk>2017-06-22 08:13:14 +0100
commit36b05c43c31e04b3e6ee078643366133ce81190a (patch)
treed3fc645e7324e340c2a06067646460ba0a283ac0 /pacman2pacman-get
parentc6d0a8d30b5edfc7786e2d75c51235e13da59ec1 (diff)
Cosmetic changes to how it handles stalled downloads.
Diffstat (limited to 'pacman2pacman-get')
-rw-r--r--pacman2pacman-get6
1 files changed, 4 insertions, 2 deletions
diff --git a/pacman2pacman-get b/pacman2pacman-get
index d93bdd8..b94b14b 100644
--- a/pacman2pacman-get
+++ b/pacman2pacman-get
@@ -223,6 +223,7 @@ then
# If our percent hasn't changed after the defined time we fall back to HTTP.
if (( timenow > ( starttime + webseed_check_freq ) )) && [[ "${progress}" == "${last_check_percentage}" ]]
then
+ echo # the previous print was not followed by a newline
echo $"Download stalled. Removing torrent from transmission and falling back to HTTP."
transmission-remote -t "${id}" -r > /dev/null
gotourbaby=0
@@ -328,21 +329,22 @@ then
if ! new_mod_time=$(stat -c %Y "/srv/pacman2pacman/dbcache/${filename##*/}" 2>/dev/null)
then
progress='failed'
+ printf "\r${http_download_string}" "${pname}" "${progress}"
# If the file was not modified we display such
elif [[ "${new_mod_time}" == "${mod_time}" ]]
then
progress='file not modified'
+ printf "\r${http_download_string}" "${pname}" "${progress}"
fi
else
# It's not a dbfile. Just check the output file exists.
if ! [[ -f "${filename}" ]]
then
progress='failed'
+ printf "\r${http_download_string}" "${pname}" "${progress}"
fi
fi
-
- printf "\r${http_download_string}" "${pname}" "${progress}"
echo