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
########################################################################
#### Script Name: inxi
#### version: 1.0.3-b1-t1
#### version: 1.0.3-b1-t2
#### Date: 17 February 2009
########################################################################
#### 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
# finally, strip out commas as they will change the driver :)
# lsusb is not contained in some users paths, hardcode it!
A_AUDIO_DATA=( "${A_AUDIO_DATA[@]}" \
"$( lsusb -v 2>/dev/null |\
grep $( cat $usb_proc_file/usbid ) |\
gawk '{ for( i=7; i<NF; i++) { printf($i " ") } printf "\n" }' |\
sed "s/,/ /"),snd-usb-audio" )
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<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
done