next test

This commit is contained in:
inxi-svn 2009-02-18 05:39:39 +00:00
parent a7f84fec15
commit f994e2ebb7

21
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### version: 1.0.3-b1-t1 #### version: 1.0.3-b1-t2
#### Date: 17 February 2009 #### Date: 17 February 2009
######################################################################## ########################################################################
#### SPECIAL THANKS #### SPECIAL THANKS
@ -1387,12 +1387,19 @@ get_audio_data()
# also, find the contents of usbid in lsusb and print everything after the 7th word on the corresponding line # 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 :) # finally, strip out commas as they will change the driver :)
# lsusb is not contained in some users paths, hardcode it! # lsusb is not contained in some users paths, hardcode it!
A_AUDIO_DATA=( "${A_AUDIO_DATA[@]}" \ usb_id=$( cat $usb_proc_file/usbid )
"$( lsusb -v 2>/dev/null |\ usb_data=$( lsusb -v 2>/dev/null | grep "$usb_id" )
grep $( cat $usb_proc_file/usbid ) |\ usb_data=$( gawk '{
gawk '{ for( i=7; i<NF; i++) { printf($i " ") } printf "\n" }' |\ gsub(/,/, " ", $0)
sed "s/,/ /"),snd-usb-audio" ) for( i=7; i<NF; i++) {
printf($i " ")
}
printf "\n"
}' <<< "$usb_data" )
# usb_data=$( lsusb -v 2>/dev/null |\
# grep $( cat $usb_proc_file/usbid ) |\
# gawk '{ gsub(/,/, " ", $0);for( i=7; i<NF; i++) { printf($i " ") } printf "\n" }' )
A_AUDIO_DATA=( "${A_AUDIO_DATA[@]}" "$usb_data,snd-usb-audio" )
fi fi
done done