From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH] alsa-info.sh: add command-line flag to print alsa info to stdout Date: Thu, 23 Apr 2009 12:19:18 +0200 Message-ID: References: <1240480834-16528-1-git-send-email-themuso@ubuntu.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 3FD1724440 for ; Thu, 23 Apr 2009 12:19:19 +0200 (CEST) In-Reply-To: <1240480834-16528-1-git-send-email-themuso@ubuntu.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Luke Yelavich Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Thu, 23 Apr 2009 20:00:33 +1000, Luke Yelavich wrote: > > Add the --stdout command-line flag to allow displaying the collected alsa > information directly to standard output. This is useful for bug information > collecting systems, such as Ubuntu's apport. > > Signed-off-by: Luke Yelavich Looks good. Applied both patches now. Thanks! Takashi > --- > utils/alsa-info.sh | 34 +++++++++++++++++++++++++++++----- > 1 files changed, 29 insertions(+), 5 deletions(-) > > diff --git a/utils/alsa-info.sh b/utils/alsa-info.sh > index 0fff671..ee0de16 100755 > --- a/utils/alsa-info.sh > +++ b/utils/alsa-info.sh > @@ -277,6 +277,12 @@ case "$1" in > REPEAT="" > shift > ;; > + --stdout) > + DIALOG="" > + NOUPLOAD="yes" > + QUESTION="no" > + TOSTDOUT="yes" > + ;; > esac > done > > @@ -627,6 +633,17 @@ then > fi > fi > ;; > + --stdout) > + NOUPLOAD="yes" > + withdevices > + withconfigs > + withaplay > + withamixer > + withalsactl > + withlsmod > + cat $FILE > + rm $FILE > + ;; > --about) > echo "Written/Tested by the following users of #alsa on irc.freenode.net:" > echo "" > @@ -635,6 +652,7 @@ then > echo " gnubien - Various script ideas / Testing" > echo " GrueMaster - HDA Intel specific items / Testing" > echo " olegfink - Script update function" > + echo " TheMuso - display to stdout functionality" > exit 0 > ;; > *) > @@ -652,6 +670,8 @@ then > echo " --no-upload (do not upload contents to remote server)" > echo " --pastebin (use http://pastebin.ca) as remote server" > echo " instead www.alsa-project.org" > + echo " --stdout (print alsa information to standard output" > + echo " instead of a file)" > echo " --about (show some information about the script)" > echo " --debug (will run the script as normal, but will not" > echo " delete $FILE)" > @@ -668,7 +688,9 @@ fi > > if [ -n "$NOUPLOAD" ]; then > > - mv $FILE $NFILE || exit 1 > + if [ -z "$TOSTDOUT" ]; then > + mv $FILE $NFILE || exit 1 > + fi > > if [[ -n $DIALOG ]] > then > @@ -686,10 +708,12 @@ if [ -n "$NOUPLOAD" ]; then > echo "Your ALSA information can be seen by looking in $NFILE" > echo "" > else > - echo "You requested that your information was NOT automatically uploaded to the $WWWSERVICE" > - echo "" > - echo "Your ALSA information can be seen by looking in $NFILE" > - echo "" > + if [ -z "$TOSTDOUT" ]; then > + echo "You requested that your information was NOT automatically uploaded to the $WWWSERVICE" > + echo "" > + echo "Your ALSA information can be seen by looking in $NFILE" > + echo "" > + fi > fi > fi > > -- > 1.6.0.4 > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel >