From fec6480dd9e348abe9b9c4c8f094e10fe9add256 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Mon, 2 Mar 2009 00:20:52 +0000 Subject: [PATCH] (no version change: branche one) Testing new swap data, nice one damentz --- inxi | 89 +++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 61 insertions(+), 28 deletions(-) diff --git a/inxi b/inxi index 7785d6e..4da25bb 100755 --- a/inxi +++ b/inxi @@ -1,8 +1,8 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.0.3-b1-t3 -#### Date: 17 February 2009 +#### version: 1.0.4-b1-t1 +#### Date: 1 March 2009 ######################################################################## #### SPECIAL THANKS ######################################################################## @@ -21,6 +21,7 @@ #### Copyright (C) 2005-2007 Michiel de Boer a.k.a. locsmif #### inxi version: Copyright (C) 2008-9 Scott Rogers & Harald Hope #### Further fixes (listed as known): Horst Tritremmel +#### Steven Barrett (aka: damentz) - usb audio patch; #### #### Current script home page: http://techpatterns.com/forums/about1131.html #### Script svn: http://code.google.com/p/inxi @@ -105,6 +106,8 @@ #### -! 10 - triggers an update from the primary dev download server instead of svn #### -! 11 - triggers an update from svn branch one - if present, of course #### -! 12 - triggers an update from svn branch two - if present, of course +#### -! 13 - triggers an update from svn branch three - if present, of course +#### -! 14 - triggers an update from svn branch four - if present, of course #### -! - Triggers an update from whatever server you list. ######################################################################## #### VARIABLES @@ -247,6 +250,8 @@ SCRIPT_VERSION_NUMBER=$( grep -im 1 'version:' $SCRIPT_PATH/$SCRIPT_NAME | gawk SCRIPT_DOWNLOAD='http://inxi.googlecode.com/svn/trunk/' SCRIPT_DOWNLOAD_BRANCH_1='http://inxi.googlecode.com/svn/branches/one/' SCRIPT_DOWNLOAD_BRANCH_2='http://inxi.googlecode.com/svn/branches/two/' +SCRIPT_DOWNLOAD_BRANCH_3='http://inxi.googlecode.com/svn/branches/three/' +SCRIPT_DOWNLOAD_BRANCH_4='http://inxi.googlecode.com/svn/branches/four/' SCRIPT_DOWNLOAD_DEV='http://smxi.org/test/' KONVI_CFG="konversation/scripts/$SCRIPT_NAME.conf" # relative path to $(kde-config --path data) @@ -904,11 +909,20 @@ get_parameters() 3) B_TESTING_1='true' B_TESTING_2='true' ;; - 10) script_self_updater "$SCRIPT_DOWNLOAD_DEV" 'dev server' + 10) + script_self_updater "$SCRIPT_DOWNLOAD_DEV" 'dev server' ;; - 11) script_self_updater "$SCRIPT_DOWNLOAD_BRANCH_1" 'svn: branch one server' + 11) + script_self_updater "$SCRIPT_DOWNLOAD_BRANCH_1" 'svn: branch one server' ;; - 12) script_self_updater "$SCRIPT_DOWNLOAD_BRANCH_2" 'svn: branch two server' + 12) + script_self_updater "$SCRIPT_DOWNLOAD_BRANCH_2" 'svn: branch two server' + ;; + 13) + script_self_updater "$SCRIPT_DOWNLOAD_BRANCH_3" 'svn: branch three server' + ;; + 14) + script_self_updater "$SCRIPT_DOWNLOAD_BRANCH_4" 'svn: branch four server' ;; http*) script_self_updater "$OPTARG" 'alt server' @@ -999,6 +1013,8 @@ show_options() print_screen_output "-! 10 - Triggers an update from the primary dev download server instead of svn." print_screen_output "-! 11 - Triggers an update from svn branch one - if present, of course." print_screen_output "-! 12 - Triggers an update from svn branch two - if present, of course." + print_screen_output "-! 13 - Triggers an update from svn branch three - if present, of course." + print_screen_output "-! 14 - Triggers an update from svn branch four - if present, of course." print_screen_output "-! - Triggers an update from whatever server you list." print_screen_output "" fi @@ -1381,24 +1397,22 @@ get_audio_data() for usb_proc_file in /proc/asound/* do # if lsusb exists, the file is a symlink, and contains an important usb exclusive file: continue - if [[ -n "$( which lsusb )" && -L "$usb_proc_file" && -e "$usb_proc_file/usbid" ]]; then + if [[ -n $( which lsusb ) && -L $usb_proc_file && -e $usb_proc_file/usbid ]]; then # send error messages of lsusb to /dev/null as it will display a bunch if not a super user - # also, find the contents of usbid in lsusb and print everything after the 7th word on the corresponding line - # finally, strip out commas as they will change the driver :) - # lsusb is not contained in some users paths, hardcode it! + # also, find the contents of usbid in lsusb and print everything after the 7th word on the + # corresponding line. Finally, strip out commas as they will change the driver :) usb_id=$( cat $usb_proc_file/usbid ) usb_data=$( lsusb -v 2>/dev/null | grep "$usb_id" ) usb_data=$( gawk '{ - gsub(/,/, " ", $0) - for( i=7; i