summaryrefslogtreecommitdiff
path: root/pacman2pacman-get
diff options
context:
space:
mode:
Diffstat (limited to 'pacman2pacman-get')
-rw-r--r--pacman2pacman-get26
1 files changed, 18 insertions, 8 deletions
diff --git a/pacman2pacman-get b/pacman2pacman-get
index c020a6a..99cf6e9 100644
--- a/pacman2pacman-get
+++ b/pacman2pacman-get
@@ -1,7 +1,7 @@
#! /bin/bash
# /usr/bin/pacman2pacman-get
#
-# Version 1.4.0
+# Version 1.4.1
#
# Copyright (C) 2014 Joseph Graham <joseph@t67.eu>
#
@@ -192,15 +192,25 @@ else
do
[[ "${char}" =~ [[:digit:].%\ ] ]] && echo -n "${char}"
done |
- while read -d '%' word
- do
- progress="${word}%"
+ {
+ while read -d '%' word
+ do
+ progress="${word}%"
- # For consistency with the transmission progress bar:
- [[ "${progress}" == '100.0%' ]] && progress='100%'
+ # There's a crazy bug that causes it to display 100% at the
+ # start of the download. This should fix it.
+ [[ "${progress}" == '100.0%' ]] && continue
- printf "\rPacman2pacman http download: %s: %s " "${pname}" "${progress}"
- done
+ printf "\rPacman2pacman http download: %s: %s " "${pname}" "${progress}"
+ done
+
+ # It's the end of the download so we can now display 100%
+ if [[ "${progress}" == '100.0%' ]]
+ then
+ progress='100%'
+ printf "\rPacman2pacman http download: %s: %s " "${pname}" "${progress}"
+ fi
+ }
echo