diff options
author | Joseph Graham <joseph@xylon.me.uk> | 2017-05-28 14:42:41 +0100 |
---|---|---|
committer | Joseph Graham <joseph@xylon.me.uk> | 2017-05-28 14:42:41 +0100 |
commit | 62dfbb61e953676309d40b564830ec8646b906e8 (patch) | |
tree | 9ed042d686f3ac4894b19e5c6ecf1530e98b087a /pacman2pacman-get | |
parent | b7d9b4646a3ab2d86bd929826759a416030b78b8 (diff) |
Fixed infinite hang bug introduced in last commit.
Diffstat (limited to 'pacman2pacman-get')
-rw-r--r-- | pacman2pacman-get | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pacman2pacman-get b/pacman2pacman-get index a3e2839..740a856 100644 --- a/pacman2pacman-get +++ b/pacman2pacman-get @@ -1,7 +1,7 @@ #! /bin/bash # /usr/bin/pacman2pacman-get # -# Version 1.5.7 +# Version 1.5.8 # # Copyright (C) 2014,2017 Joseph Graham <joseph@xylon.me.uk> # @@ -112,7 +112,7 @@ then done < <(grep '^Server \?= \?' "/etc/pacman.d/mirrorlist" | shuf | head -n 3) # Get the name of the torrent downloaded - read -t 6 response < "${fifoname}" + read -t 6 response < <(cat "${fifoname}") fi (( debugmode )) && echoerr "response var: '${response}'" @@ -121,8 +121,10 @@ gotourbaby=0 # to record if we've got the torrent yet. # If there's a .torrent we download the package with transmission # otherwize we just download it by http. -if [[ "${response}" == 'found_torrent:'* ]] +if [[ "${response}" != 'found_torrent:'* ]] then + echo "Can't find a torrent file for this package :S" +else gotourbaby=1 # assume success unless proven otherwize cd "${pkg_cache_location}" |