mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
trying to handle weird space in name case
This commit is contained in:
parent
10f94c950f
commit
812417b90a
15
inxi
15
inxi
|
@ -1849,8 +1849,8 @@ get_graphics_glx_data()
|
||||||
function join(arr, sep) {
|
function join(arr, sep) {
|
||||||
s=""
|
s=""
|
||||||
i=flag=0
|
i=flag=0
|
||||||
for (i in arr) {
|
for ( i in arr ) {
|
||||||
if (flag++) {
|
if ( flag++ ) {
|
||||||
s = s sep
|
s = s sep
|
||||||
}
|
}
|
||||||
s = s i
|
s = s i
|
||||||
|
@ -1862,9 +1862,9 @@ get_graphics_glx_data()
|
||||||
IGNORECASE=1
|
IGNORECASE=1
|
||||||
}
|
}
|
||||||
/opengl renderer/ {
|
/opengl renderer/ {
|
||||||
if ($2 ~ /mesa/) {
|
if ( $2 ~ /mesa/ ) {
|
||||||
# Allow r300 et al, but not the rest
|
# Allow r300 et al, but not the rest
|
||||||
if ($2 ~ / r[3-9][0-9][0-9] /) {
|
if ( $2 ~ / r[3-9][0-9][0-9] / ) {
|
||||||
a[$2]
|
a[$2]
|
||||||
f++
|
f++
|
||||||
}
|
}
|
||||||
|
@ -1872,7 +1872,7 @@ get_graphics_glx_data()
|
||||||
}
|
}
|
||||||
$2 && a[$2]
|
$2 && a[$2]
|
||||||
}
|
}
|
||||||
/opengl version/ && (f || $2 !~ /mesa/) {
|
/opengl version/ && ( f || $2 !~ /mesa/ ) {
|
||||||
$2 && b[$2]
|
$2 && b[$2]
|
||||||
}
|
}
|
||||||
/direct rendering/ {
|
/direct rendering/ {
|
||||||
|
@ -2444,6 +2444,8 @@ get_partition_data_advanced()
|
||||||
partition = ""
|
partition = ""
|
||||||
partTemp = ""
|
partTemp = ""
|
||||||
}
|
}
|
||||||
|
# trying to handle space in name
|
||||||
|
gsub( /\\040/, " ", $0 )
|
||||||
/[ \t]'$mount_point'[ \t]/ && $1 != "rootfs" {
|
/[ \t]'$mount_point'[ \t]/ && $1 != "rootfs" {
|
||||||
# initialize the variables
|
# initialize the variables
|
||||||
label = ""
|
label = ""
|
||||||
|
@ -2512,6 +2514,9 @@ get_partition_data_advanced()
|
||||||
}' )
|
}' )
|
||||||
elif [[ -n $dev_disk_label ]] && [[ -z $dev_item && -n $dev_label ]];then
|
elif [[ -n $dev_disk_label ]] && [[ -z $dev_item && -n $dev_label ]];then
|
||||||
dev_item=$( echo "$dev_disk_label" | gawk '
|
dev_item=$( echo "$dev_disk_label" | gawk '
|
||||||
|
# first we need to change space x20 in by-label back to a real space
|
||||||
|
gsub( /x20/, " ", $0 )
|
||||||
|
# then we can see if the string is there
|
||||||
/'$dev_label'/ {
|
/'$dev_label'/ {
|
||||||
item=gensub( /..\/..\/(.+)/, "\\1", 1, $NF )
|
item=gensub( /..\/..\/(.+)/, "\\1", 1, $NF )
|
||||||
print item
|
print item
|
||||||
|
|
Loading…
Reference in a new issue