[v2,alsa-utils,07/11] alsa-info.sh: Remove progress spinner during upload without dialog
diff mbox series

Message ID 1578074158-30328-8-git-send-email-david.ward@ll.mit.edu
State New
Headers show
Series
  • alsa-info.sh: Improve output and fix file upload issues
Related show

Commit Message

David Ward Jan. 3, 2020, 5:55 p.m. UTC
The spinner did not actually provide information about the status
of the file upload, and caused other problems: it would repeatedly
spawn new pgrep processes (without a delay between them), and it
blocked the script if any wget process was running on the system.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
---
 alsa-info/alsa-info.sh | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

Patch
diff mbox series

diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh
index 7204c8e..f958599 100755
--- a/alsa-info/alsa-info.sh
+++ b/alsa-info/alsa-info.sh
@@ -849,22 +849,12 @@  else
 
 if [[ -z $PASTEBIN ]]; then
 	echo -n "Uploading information to www.alsa-project.org ... " 
-	wget -O - --tries=5 --timeout=60 --post-file=$FILE http://www.alsa-project.org/cardinfo-db/ &>$TEMPDIR/wget.tmp &
+	wget -O - --tries=5 --timeout=60 --post-file=$FILE "http://www.alsa-project.org/cardinfo-db/" &>$TEMPDIR/wget.tmp
 else
 	echo -n "Uploading information to www.pastebin.ca ... " 
-	wget -O - --tries=5 --timeout=60 --post-file=$FILE http://pastebin.ca/quiet-paste.php?api=$PASTEBINKEY &>$TEMPDIR/wget.tmp &
+	wget -O - --tries=5 --timeout=60 --post-file=$FILE "http://pastebin.ca/quiet-paste.php?api=$PASTEBINKEY" &>$TEMPDIR/wget.tmp
 fi
 
-#Progess spinner for wget transfer.
-i=1
-sp="/-\|"
-echo -n ' '
-while pgrep wget &>/dev/null
-do
-	echo -en "\b${sp:i++%${#sp}:1}"
-done
-
-echo -e "\b Done!"
 echo ""
 
 fi # dialog