Fixed obscure bug in gawk for gfx data in get gfx

This commit is contained in:
inxi-svn 2008-10-30 05:25:21 +00:00
parent a9e0462c43
commit d1694d1374

6
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### version: 0.1.42 #### version: 0.1.43
#### Date: October 29 2008 #### Date: October 29 2008
######################################################################## ########################################################################
#### inxi is a fork of infobash, the original bash sys info script by locsmif #### inxi is a fork of infobash, the original bash sys info script by locsmif
@ -928,7 +928,7 @@ get_graphics_data()
XVER="$XVENDOR $XVERNUM" XVER="$XVENDOR $XVERNUM"
IFS=$'\n' IFS=$'\n'
A_GFX_DATA=( $( glxinfo | gawk -F ': ' ' GLX=($(glxinfo | gawk -F ': ' '
function join(arr, sep) { function join(arr, sep) {
s="" s=""
i=flag=0 i=flag=0
@ -958,7 +958,7 @@ get_graphics_data()
END { END {
printf("%s\n%s\n%s\n", join(a,", "), join(b,", "), join(c,", ")) printf("%s\n%s\n%s\n", join(a,", "), join(b,", "), join(c,", "))
} }
' ) ) '))
IFS="$OIFS" IFS="$OIFS"
GLXR="${A_GFX_DATA[0]}" GLXR="${A_GFX_DATA[0]}"
GLXV="${A_GFX_DATA[1]}" GLXV="${A_GFX_DATA[1]}"