]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsa-info.sh: Exit script after writing information to stdout
authorDavid Ward <david.ward@ll.mit.edu>
Sat, 21 Dec 2019 05:32:05 +0000 (00:32 -0500)
committerTakashi Iwai <tiwai@suse.de>
Tue, 7 Jan 2020 13:04:40 +0000 (14:04 +0100)
The '--stdout' option is mutually exclusive with uploading the file.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
alsa-info/alsa-info.sh

index bf353deceb7dcf8ee2ea1643da56cf690c3fad69..372d7ae3d692a0d06ac1885f4695aa85f8ea1faf 100755 (executable)
@@ -349,9 +349,7 @@ case "$1" in
                ;;
        --stdout)
                DIALOG=""
-               UPLOAD="no"
                WELCOME="no"
-               TOSTDOUT="yes"
                ;;
 esac
 done
@@ -720,6 +718,7 @@ if [ -n "$1" ]; then
                        fi
                        cat $FILE
                        rm $FILE
+                       exit
                        ;;
                --about)
                        echo "Written/Tested by the following users of #alsa on irc.freenode.net:"
@@ -793,10 +792,8 @@ fi
 
 if [ "$UPLOAD" = "no" ]; then
 
-       if [ -z "$TOSTDOUT" ]; then
-               mv -f $FILE $NFILE || exit 1
-               KEEP_OUTPUT="yes"
-       fi
+       mv -f $FILE $NFILE || exit 1
+       KEEP_OUTPUT="yes"
 
        if [[ -n $DIALOG ]]
        then
@@ -815,11 +812,9 @@ if [ "$UPLOAD" = "no" ]; then
                        echo "Your ALSA information is in $NFILE"
                        echo ""
                else
-                       if [ -z "$TOSTDOUT" ]; then
-                               echo ""
-                               echo "Your ALSA information is in $NFILE"
-                               echo ""
-                       fi
+                       echo ""
+                       echo "Your ALSA information is in $NFILE"
+                       echo ""
                fi
        fi