summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pacman2pacman-get8
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}"