From 62dfbb61e953676309d40b564830ec8646b906e8 Mon Sep 17 00:00:00 2001 From: Joseph Graham Date: Sun, 28 May 2017 14:42:41 +0100 Subject: Fixed infinite hang bug introduced in last commit. --- pacman2pacman-get | 8 +++++--- 1 file 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 # @@ -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}" -- cgit v1.2.2