summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Ward <david.ward@ll.mit.edu>2019-12-21 00:32:06 -0500
committerTakashi Iwai <tiwai@suse.de>2020-01-07 14:04:40 +0100
commitd928f7667cfead36b33f38ad7668ca96c6045d4e (patch)
treedad567bee0e642a8160765b5362f6cf9ca8b7066
parente9e3c3a27d4faad0000a10386da471227b0644d8 (diff)
downloadalsa-utils-d928f7667cfead36b33f38ad7668ca96c6045d4e.tar.gz
alsa-info.sh: Replace gauge with infobox for upload dialog
The gauge did not actually show the upload progress; in fact, the dialog did not even appear until after the upload was completed. Use an infobox instead, which will be displayed while wget runs. Signed-off-by: David Ward <david.ward@ll.mit.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rwxr-xr-xalsa-info/alsa-info.sh12
1 files changed, 2 insertions, 10 deletions
diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh
index 372d7ae..a02864d 100755
--- a/alsa-info/alsa-info.sh
+++ b/alsa-info/alsa-info.sh
@@ -830,19 +830,11 @@ if [[ -n $DIALOG ]]
then
if [[ -z $PASTEBIN ]]; then
+ dialog --backtitle "$BGTITLE" --infobox "Uploading information to www.alsa-project.org ..." 6 70
wget -O - --tries=5 --timeout=60 --post-file=$FILE "http://www.alsa-project.org/cardinfo-db/" &>$TEMPDIR/wget.tmp || echo "Upload failed; exit"
- { for i in 10 20 30 40 50 60 70 80 90; do
- echo $i
- sleep 0.2
- done
- echo; } |dialog --backtitle "$BGTITLE" --guage "Uploading information to www.alsa-project.org ..." 6 70 0
else
+ dialog --backtitle "$BGTITLE" --infobox "Uploading information to www.pastebin.ca ..." 6 70
wget -O - --tries=5 --timeout=60 --post-file=$FILE "http://pastebin.ca/quiet-paste.php?api=$PASTEBINKEY&encrypt=t&encryptpw=blahblah" &>$TEMPDIR/wget.tmp || echo "Upload failed; exit"
- { for i in 10 20 30 40 50 60 70 80 90; do
- echo $i
- sleep 0.2
- done
- echo; } |dialog --backtitle "$BGTITLE" --guage "Uploading information to www.pastebin.ca ..." 6 70 0
fi
dialog --backtitle "$BGTITLE" --title "Information uploaded" --yesno "Would you like to see the uploaded information?" 5 100