New version, new tarball. This fixes a subtle gawk issue that could in some systems make -G

hang endlessly.

Also started on more optimizing, getting rid of as many subshells as possible.
This commit is contained in:
Harald Hope 2017-07-29 12:38:34 -07:00
parent b2d136761a
commit a29641babe
2 changed files with 145 additions and 135 deletions

261
inxi
View file

@ -1,8 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### Version: 2.3.27 #### Version: 2.3.28
#### Date: 2017-07-28 #### Date: 2017-07-29
#### Patch Number: 00 #### Patch Number: 00
######################################################################## ########################################################################
#### SPECIAL THANKS #### SPECIAL THANKS
@ -501,10 +501,11 @@ WAN_IP_URL='http://smxi.org/opt/ip.php'
KONVI_CFG="konversation/scripts/$SCRIPT_NAME.conf" # relative path to $(kde-config --path data) KONVI_CFG="konversation/scripts/$SCRIPT_NAME.conf" # relative path to $(kde-config --path data)
### INITIALIZE VARIABLES NULL ### ### INITIALIZE VARIABLES NULL ###
ARCH='' # cpu microarchitecture
BSD_TYPE='' BSD_TYPE=''
BSD_VERSION= BSD_VERSION=
CMDL_MAX='' CMDL_MAX=''
CPU_COUNT_ALPHA=''
DEV_DISK_ID='' DEV_DISK_ID=''
DEV_DISK_LABEL='' DEV_DISK_LABEL=''
DEV_DISK_MAPPER='' DEV_DISK_MAPPER=''
@ -931,7 +932,7 @@ initialize_data()
elif type -p curl &>/dev/null;then elif type -p curl &>/dev/null;then
DOWNLOADER='curl' DOWNLOADER='curl'
NO_SSL=' --insecure' NO_SSL=' --insecure'
elif [[ $BSD_VERSION == 'openbsd' && -n $( type -p ftp ) ]];then elif [[ $BSD_VERSION == 'openbsd' ]] && type -p ftp &>/dev/null;then
DOWNLOADER='ftp' DOWNLOADER='ftp'
else else
DOWNLOADER='no-downloader' DOWNLOADER='no-downloader'
@ -1763,7 +1764,7 @@ debug_data_collector()
local xiin_url="https://github.com/smxi/inxi/raw/xiin/$xiin_file" local xiin_url="https://github.com/smxi/inxi/raw/xiin/$xiin_file"
local Line='-------------------------' root_string='' local Line='-------------------------' root_string=''
local start_directory=$( pwd ) local start_directory=$( pwd )
local host=$( tr '[A-Z]' '[a-z]' <<< "$HOSTNAME" ) local host="${HOSTNAME,,}"
local downloader_error=0 debug_i='' local downloader_error=0 debug_i=''
if [[ $B_DEBUG_I == 'true' ]];then if [[ $B_DEBUG_I == 'true' ]];then
@ -3439,7 +3440,7 @@ get_start_client()
Irc_Client_Path=$( readlink /proc/$PPID/exe ) Irc_Client_Path=$( readlink /proc/$PPID/exe )
# Irc_Client_Path=$( ps -p $PPID | gawk '!/[[:space:]]*PID/ {print $5}' ) # Irc_Client_Path=$( ps -p $PPID | gawk '!/[[:space:]]*PID/ {print $5}' )
# echo $( ps -p $PPID ) # echo $( ps -p $PPID )
irc_client_path_lower=$( tr '[A-Z]' '[a-z]' <<< $Irc_Client_Path ) irc_client_path_lower=${Irc_Client_Path,,}
App_Working_Name=${irc_client_path_lower##*/} App_Working_Name=${irc_client_path_lower##*/}
# handles the xchat/sh/bash/dash cases, and the konversation/perl cases, where clients # handles the xchat/sh/bash/dash cases, and the konversation/perl cases, where clients
# report themselves as perl or unknown shell. IE: when konversation starts inxi # report themselves as perl or unknown shell. IE: when konversation starts inxi
@ -3456,7 +3457,7 @@ get_start_client()
fi fi
if [[ -n $pppid && -f /proc/$pppid/exe ]];then if [[ -n $pppid && -f /proc/$pppid/exe ]];then
Irc_Client_Path="$( readlink /proc/$pppid/exe )" Irc_Client_Path="$( readlink /proc/$pppid/exe )"
irc_client_path_lower=$( tr '[A-Z]' '[a-z]' <<< $Irc_Client_Path ) irc_client_path_lower=${Irc_Client_Path,,}
App_Working_Name=${irc_client_path_lower##*/} App_Working_Name=${irc_client_path_lower##*/}
B_Non_Native_App='true' B_Non_Native_App='true'
fi fi
@ -3498,7 +3499,7 @@ get_start_client()
if [[ -n $App_Working_Name ]];then if [[ -n $App_Working_Name ]];then
Irc_Client_Path=$App_Working_Name Irc_Client_Path=$App_Working_Name
irc_client_path_lower=$( tr '[A-Z]' '[a-z]' <<< $Irc_Client_Path ) irc_client_path_lower=${Irc_Client_Path,,}
App_Working_Name=${irc_client_path_lower##*/} App_Working_Name=${irc_client_path_lower##*/}
B_Non_Native_App='false' B_Non_Native_App='false'
get_irc_client_version get_irc_client_version
@ -4358,110 +4359,108 @@ get_battery_data()
get_cpu_architecture() get_cpu_architecture()
{ {
eval $LOGFS eval $LOGFS
local arch=""
case $1 in case $1 in
amd) amd)
case $2 in case $2 in
4) 4)
case $3 in case $3 in
3|7|8|9|A)arch='Am486';; 3|7|8|9|A)ARCH='Am486';;
E|F)arch='Am5x86';; E|F)ARCH='Am5x86';;
esac esac
;; ;;
5) 5)
case $3 in case $3 in
0|1|2|3)arch='K5';; 0|1|2|3)ARCH='K5';;
6|7)arch='K6';; 6|7)ARCH='K6';;
8)arch='K6-2';; 8)ARCH='K6-2';;
9|D)arch='K6-3';; 9|D)ARCH='K6-3';;
esac esac
;; ;;
6) 6)
case $3 in case $3 in
1|2)arch='K7';; 1|2)ARCH='K7';;
3|4)arch='K7 Thunderbird';; 3|4)ARCH='K7 Thunderbird';;
6|7|8|A)arch='K7 Palomino+';; 6|7|8|A)ARCH='K7 Palomino+';;
*)arch='K7';; *)ARCH='K7';;
esac esac
;; ;;
F) F)
case $3 in case $3 in
4|5|7|8|B|C|E|F|14|15|17|18|1B|1C|1F)arch='K8';; 4|5|7|8|B|C|E|F|14|15|17|18|1B|1C|1F)ARCH='K8';;
21|23|24|25|27|28|2C|2F)arch='K8 rev.E';; 21|23|24|25|27|28|2C|2F)ARCH='K8 rev.E';;
41|43|48|4B|4C|4F|5D|5F|68|6B|6C|6F|7C|7F|C1)arch='K8 rev.F+';; 41|43|48|4B|4C|4F|5D|5F|68|6B|6C|6F|7C|7F|C1)ARCH='K8 rev.F+';;
*)arch='K8';; *)ARCH='K8';;
esac esac
;; ;;
10) 10)
case $3 in case $3 in
2|4|5|6|8|9|A)arch='K10';; 2|4|5|6|8|9|A)ARCH='K10';;
*)arch='K10';; *)ARCH='K10';;
esac esac
;; ;;
11) 11)
case $3 in case $3 in
3)arch='K8 rev.E+';; 3)ARCH='K8 rev.E+';;
esac esac
;; ;;
12) 12)
case $3 in case $3 in
1)arch='K10';; 1)ARCH='K10';;
*)arch='K10';; *)ARCH='K10';;
esac esac
;; ;;
14) 14)
case $3 in case $3 in
1|2)arch='Bobcat';; 1|2)ARCH='Bobcat';;
*)arch='Bobcat';; *)ARCH='Bobcat';;
esac esac
;; ;;
15) 15)
case $3 in case $3 in
1)arch='Bulldozer';; 1)ARCH='Bulldozer';;
2|10|13)arch='Piledriver';; 2|10|13)ARCH='Piledriver';;
30)arch='Steamroller';; 30)ARCH='Steamroller';;
*)arch='Bulldozer';; *)ARCH='Bulldozer';;
esac esac
;; ;;
16) 16)
case $3 in case $3 in
0)arch='Jaguar';; 0)ARCH='Jaguar';;
30)arch='Puma';; 30)ARCH='Puma';;
*)arch='Jaguar';; *)ARCH='Jaguar';;
esac esac
;; ;;
17) 17)
case $3 in case $3 in
1)arch='Zen';; 1)ARCH='Zen';;
*)arch='Zen';; *)ARCH='Zen';;
esac esac
;; ;;
esac esac
;; ;;
arm) arm)
if [[ "$2" != '' ]];then if [[ "$2" != '' ]];then
arch="ARMv$2" ARCH="ARMv$2"
else else
arch='ARM' ARCH='ARM'
fi fi
;; ;;
centaur) centaur)
case $2 in case $2 in
5) 5)
case $3 in case $3 in
4)arch='WinChip C6';; 4)ARCH='WinChip C6';;
8)arch='WinChip 2';; 8)ARCH='WinChip 2';;
9)arch='WinChip 3';; 9)ARCH='WinChip 3';;
esac esac
;; ;;
6) 6)
case $3 in case $3 in
6)arch='WinChip-based';; 6)ARCH='WinChip-based';;
7|8)arch='C3';; 7|8)ARCH='C3';;
9)arch='C3-2';; 9)ARCH='C3-2';;
A|D)arch='C7';; A|D)ARCH='C7';;
F)arch='Isaiah';; F)ARCH='Isaiah';;
esac esac
;; ;;
esac esac
@ -4470,56 +4469,55 @@ get_cpu_architecture()
case $2 in case $2 in
4) 4)
case $3 in case $3 in
0|1|2|3|4|5|6|7|8|9)arch='486';; 0|1|2|3|4|5|6|7|8|9)ARCH='486';;
esac esac
;; ;;
5) 5)
case $3 in case $3 in
1|2|3|7)arch='P5';; 1|2|3|7)ARCH='P5';;
4|8)arch='P5';; # MMX 4|8)ARCH='P5';; # MMX
9)arch='Quark';; 9)ARCH='Quark';;
esac esac
;; ;;
6) 6)
case $3 in case $3 in
1)arch='P6 Pro';; 1)ARCH='P6 Pro';;
3|5|6)arch='P6 II';; 3|5|6)ARCH='P6 II';;
7|8|A|B)arch='P6 III';; 7|8|A|B)ARCH='P6 III';;
9|15)arch='Mobile';; # pentium M 9|15)ARCH='Mobile';; # pentium M
D)arch='Mobile Dothan';; # Pentium M D)ARCH='Mobile Dothan';; # Pentium M
E)arch='Core Yonah';; E)ARCH='Core Yonah';;
F)arch='Core 2';; F)ARCH='Core 2';;
17|1D)arch='Core Penryn';; 17|1D)ARCH='Core Penryn';;
1A|1E|2E)arch='Nehalem';; 1A|1E|2E)ARCH='Nehalem';;
1C|35|36)arch='Bonnell';; 1C|35|36)ARCH='Bonnell';;
25|2C|2F)arch='Westmere';; 25|2C|2F)ARCH='Westmere';;
26|27)arch='Bonnell';; 26|27)ARCH='Bonnell';;
2A|2D)arch='Sandy Bridge';; 2A|2D)ARCH='Sandy Bridge';;
37|4A|4D)arch='Silvermont';; 37|4A|4D)ARCH='Silvermont';;
3A|3E)arch='Ivy Bridge';; 3A|3E)ARCH='Ivy Bridge';;
3C|3F|45|46)arch='Haswell';; 3C|3F|45|46)ARCH='Haswell';;
3D)arch='Broadwell';; 3D)ARCH='Broadwell';;
4E)arch='Skylake';; 4E)ARCH='Skylake';;
esac esac
;; ;;
B) B)
case $3 in case $3 in
1)arch='Knights Corner';; 1)ARCH='Knights Corner';;
esac esac
;; ;;
F) F)
case $3 in case $3 in
0|1|2)arch='Netburst';; 0|1|2)ARCH='Netburst';;
3|4|6)arch='Netburst Prescott';; # Nocona 3|4|6)ARCH='Netburst Prescott';; # Nocona
*)arch='Netburst';; *)ARCH='Netburst';;
esac esac
;; ;;
esac esac
;; ;;
esac esac
echo $arch log_function_data "ARCH: $ARCH"
eval $LOGFE eval $LOGFE
} }
@ -4528,7 +4526,7 @@ get_cpu_architecture()
get_cpu_core_count() get_cpu_core_count()
{ {
eval $LOGFS eval $LOGFS
local cpu_physical_count='' cpu_core_count='' cpu_type='' cpu_alpha_count='' cores_per_cpu='' local cpu_physical_count='' cpu_core_count='' cpu_type='' cores_per_cpu=''
local array_data='' local array_data=''
if [[ $B_CPUINFO_FILE == 'true' ]]; then if [[ $B_CPUINFO_FILE == 'true' ]]; then
@ -4541,11 +4539,11 @@ get_cpu_core_count()
cpu_type=${A_CPU_TYPE_PCNT_CCNT[0]} cpu_type=${A_CPU_TYPE_PCNT_CCNT[0]}
# match the numberic value to an alpha value # match the numberic value to an alpha value
cpu_alpha_count=$( get_cpu_core_count_alpha "$cpu_core_count" ) get_cpu_core_count_alpha "$cpu_core_count"
# create array, core count integer; core count string # create array, core count integer; core count string
# A_CPU_CORE_DATA=( "$cpu_core_count" "$cpu_alpha_count Core$cpu_type" ) # A_CPU_CORE_DATA=( "$cpu_core_count" "$CPU_COUNT_ALPHA Core$cpu_type" )
array_data="$cpu_physical_count,$cpu_alpha_count,$cpu_type,$cpu_core_count" array_data="$cpu_physical_count,$CPU_COUNT_ALPHA,$cpu_type,$cpu_core_count"
IFS=',' IFS=','
A_CPU_CORE_DATA=( $array_data ) A_CPU_CORE_DATA=( $array_data )
IFS="$ORIGINAL_IFS" IFS="$ORIGINAL_IFS"
@ -4575,7 +4573,7 @@ get_cpu_core_count()
}' <<< "$Sysctl_a_Data" ) }' <<< "$Sysctl_a_Data" )
if [[ -n $( grep -E '^[0-9]+$' <<< "$cpu_core_count" ) ]];then if [[ -n $( grep -E '^[0-9]+$' <<< "$cpu_core_count" ) ]];then
cpu_alpha_count=$( get_cpu_core_count_alpha "$cpu_core_count" ) get_cpu_core_count_alpha "$cpu_core_count"
if [[ $cpu_core_count -gt 1 ]];then if [[ $cpu_core_count -gt 1 ]];then
cpu_type='-SMP-' cpu_type='-SMP-'
else else
@ -4592,7 +4590,7 @@ get_cpu_core_count()
else else
cpu_physical_count=1 cpu_physical_count=1
fi fi
array_data="$cpu_physical_count,$cpu_alpha_count,$cpu_type,$cpu_core_count" array_data="$cpu_physical_count,$CPU_COUNT_ALPHA,$cpu_type,$cpu_core_count"
IFS=',' IFS=','
A_CPU_CORE_DATA=( $array_data ) A_CPU_CORE_DATA=( $array_data )
IFS="$ORIGINAL_IFS" IFS="$ORIGINAL_IFS"
@ -4607,23 +4605,21 @@ get_cpu_core_count()
get_cpu_core_count_alpha() get_cpu_core_count_alpha()
{ {
eval $LOGFS eval $LOGFS
local cpu_alpha_count=''
case $1 in case $1 in
1) cpu_alpha_count='Single';; 1) CPU_COUNT_ALPHA='Single';;
2) cpu_alpha_count='Dual';; 2) CPU_COUNT_ALPHA='Dual';;
3) cpu_alpha_count='Triple';; 3) CPU_COUNT_ALPHA='Triple';;
4) cpu_alpha_count='Quad';; 4) CPU_COUNT_ALPHA='Quad';;
5) cpu_alpha_count='Penta';; 5) CPU_COUNT_ALPHA='Penta';;
6) cpu_alpha_count='Hexa';; 6) CPU_COUNT_ALPHA='Hexa';;
7) cpu_alpha_count='Hepta';; 7) CPU_COUNT_ALPHA='Hepta';;
8) cpu_alpha_count='Octa';; 8) CPU_COUNT_ALPHA='Octa';;
9) cpu_alpha_count='Ennea';; 9) CPU_COUNT_ALPHA='Ennea';;
10) cpu_alpha_count='Deca';; 10) CPU_COUNT_ALPHA='Deca';;
*) cpu_alpha_count='Multi';; *) CPU_COUNT_ALPHA='Multi';;
esac esac
log_function_data "CPU_COUNT_ALPHA: $CPU_COUNT_ALPHA"
echo $cpu_alpha_count
eval $LOGFE eval $LOGFE
} }
@ -4881,6 +4877,7 @@ get_cpu_data_bsd()
bSwitchFs="false" bSwitchFs="false"
min=0 min=0
max=0 max=0
# these can be found in dmesg.boot just like in cpuinfo except all in one row
type="" type=""
family="" family=""
model_nu="" model_nu=""
@ -5485,7 +5482,7 @@ get_desktop_environment()
version="$version " version="$version "
fi fi
desktop_environment="WM2" desktop_environment="WM2"
elif [[ -n $( grep -is 'herbstluftwm' <<< "$xprop_root" ) ]];then elif [[ -z "${xprop_root/*herbstluftwm*/}" ]];then
version=$( get_program_version 'herbstluftwm' '^herbstluftwm' 'NF' ) version=$( get_program_version 'herbstluftwm' '^herbstluftwm' 'NF' )
if [[ -n $version ]];then if [[ -n $version ]];then
version="$version " version="$version "
@ -5497,22 +5494,22 @@ get_desktop_environment()
# note that gawk is going to exit after first occurrence of search string, so no need for extra # note that gawk is going to exit after first occurrence of search string, so no need for extra
# http://www.xwinman.org/ for more possible wm # http://www.xwinman.org/ for more possible wm
if [[ -z $desktop_environment ]];then if [[ -z $desktop_environment ]];then
if [[ -n $( grep -is 'fvwm-crystal' <<< "$Ps_aux_Data" ) ]];then if [[ -z "${Ps_aux_Data/*fvwm-crystal*/}" ]];then
version=$( get_program_version 'fvwm' '^fvwm' '2' ) version=$( get_program_version 'fvwm' '^fvwm' '2' )
desktop_environment='FVWM-Crystal' desktop_environment='FVWM-Crystal'
elif [[ -n $( grep -is 'fvwm' <<< "$Ps_aux_Data" ) ]];then elif [[ -z "${Ps_aux_Data/*fvwm*/}" ]];then
version=$( get_program_version 'fvwm' '^fvwm' '2' ) version=$( get_program_version 'fvwm' '^fvwm' '2' )
desktop_environment='FVWM' desktop_environment='FVWM'
elif [[ -n $( grep -is 'pekwm' <<< "$Ps_aux_Data" ) ]];then elif [[ -z "${Ps_aux_Data/*pekwm*/}" ]];then
version=$( get_program_version 'pekwm' '^pekwm' '3' ) version=$( get_program_version 'pekwm' '^pekwm' '3' )
desktop_environment='pekwm' desktop_environment='pekwm'
elif [[ -n $( grep -is 'awesome' <<< "$Ps_aux_Data" ) ]];then elif [[ -z "${Ps_aux_Data/*awesome*/}" ]];then
version=$( get_program_version 'awesome' '^awesome' '2' ) version=$( get_program_version 'awesome' '^awesome' '2' )
desktop_environment='Awesome' desktop_environment='Awesome'
elif [[ -n $( grep -is 'scrotwm' <<< "$Ps_aux_Data" ) ]];then elif [[ -z "${Ps_aux_Data/*scrotwm*/}" ]];then
version=$( get_program_version 'scrotwm' '^welcome.*scrotwm' '4' ) version=$( get_program_version 'scrotwm' '^welcome.*scrotwm' '4' )
desktop_environment='Scrotwm' # no --version for this one desktop_environment='Scrotwm' # no --version for this one
elif [[ -n $( grep -is 'spectrwm' <<< "$Ps_aux_Data" ) ]];then elif [[ -z "${Ps_aux_Data/*spectrwm*/}" ]];then
version=$( get_program_version 'spectrwm' '^spectrwm.*welcome.*spectrwm' '5' ) version=$( get_program_version 'spectrwm' '^spectrwm.*welcome.*spectrwm' '5' )
desktop_environment='Spectrwm' # no --version for this one desktop_environment='Spectrwm' # no --version for this one
elif [[ -n $( grep -Eis '([[:space:]]|/)twm' <<< "$Ps_aux_Data" ) ]];then elif [[ -n $( grep -Eis '([[:space:]]|/)twm' <<< "$Ps_aux_Data" ) ]];then
@ -5520,20 +5517,20 @@ get_desktop_environment()
elif [[ -n $( grep -Eis '([[:space:]]|/)dwm' <<< "$Ps_aux_Data" ) ]];then elif [[ -n $( grep -Eis '([[:space:]]|/)dwm' <<< "$Ps_aux_Data" ) ]];then
version=$( get_program_version 'dwm' '^dwm' '1' ) version=$( get_program_version 'dwm' '^dwm' '1' )
desktop_environment='dwm' desktop_environment='dwm'
elif [[ -n $( grep -is 'wmii2' <<< "$Ps_aux_Data" ) ]];then elif [[ -z "${Ps_aux_Data/*wmii2*/}" ]];then
version=$( get_program_version 'wmii2' '^wmii2' '1' ) version=$( get_program_version 'wmii2' '^wmii2' '1' )
desktop_environment='wmii2' desktop_environment='wmii2'
# note: in debian at least, wmii is actuall wmii3 # note: in debian at least, wmii is actuall wmii3
elif [[ -n $( grep -is 'wmii' <<< "$Ps_aux_Data" ) ]];then elif [[ -z "${Ps_aux_Data/*wmii*/}" ]];then
version=$( get_program_version 'wmii' '^wmii' '1' ) version=$( get_program_version 'wmii' '^wmii' '1' )
desktop_environment='wmii' desktop_environment='wmii'
elif [[ -n $( grep -Eis '([[:space:]]|/)jwm' <<< "$Ps_aux_Data" ) ]];then elif [[ -n $( grep -Eis '([[:space:]]|/)jwm' <<< "$Ps_aux_Data" ) ]];then
version=$( get_program_version 'jwm' '^jwm' '2' ) version=$( get_program_version 'jwm' '^jwm' '2' )
desktop_environment='JWM' desktop_environment='JWM'
elif [[ -n $( grep -is 'sawfish' <<< "$Ps_aux_Data" ) ]];then elif [[ -z "${Ps_aux_Data/*sawfish*/}" ]];then
version=$( get_program_version 'sawfish' '^sawfish' '3' ) version=$( get_program_version 'sawfish' '^sawfish' '3' )
desktop_environment='Sawfish' desktop_environment='Sawfish'
elif [[ -n $( grep -is 'afterstep' <<< "$Ps_aux_Data" ) ]];then elif [[ -z "${Ps_aux_Data/*afterstep*/}" ]];then
version=$( get_program_version 'afterstep' '^afterstep' '3' ) version=$( get_program_version 'afterstep' '^afterstep' '3' )
desktop_environment='AfterStep' desktop_environment='AfterStep'
fi fi
@ -6564,8 +6561,7 @@ get_graphics_card_data()
card=$NF card=$NF
busId=gensub(/^([0-9a-f:\.]+) (.+)$/,"\\1",1,$1) busId=gensub(/^([0-9a-f:\.]+) (.+)$/,"\\1",1,$1)
trueCard=gensub(/(.*)\.([0-9]+)$/,"\\2",1,busId) trueCard=gensub(/(.*)\.([0-9]+)$/,"\\2",1,busId)
while (!/^$/) { while ( getline && !/^$/) {
getline
if ( $1 ~ /Kernel driver in use/ ){ if ( $1 ~ /Kernel driver in use/ ){
driver=$2 driver=$2
} }
@ -6930,39 +6926,38 @@ get_graphics_display_compositor()
{ {
eval $LOGFS eval $LOGFS
local compositor='' local compositor=''
local ps_aux="$( ps aux)"
if [[ -n $( grep 'mutter' <<< "$ps_aux" ) ]];then if [[ -z "${Ps_aux_Data/*mutter*/}" ]];then
compositor='mutter' compositor='mutter'
elif [[ -n $( grep 'gnome-shell' <<< "$ps_aux" ) ]];then elif [[ -z "${Ps_aux_Data/*gnome-shell*/}" ]];then
compositor='gnome-shell' compositor='gnome-shell'
elif [[ -n $( grep 'kwin' <<< "$ps_aux" ) ]];then elif [[ -z "${Ps_aux_Data/*kwin*/}" ]];then
compositor='kwin' compositor='kwin'
elif [[ -n $( grep 'moblin' <<< "$ps_aux" ) ]];then elif [[ -z "${Ps_aux_Data/*moblin*/}" ]];then
compositor='moblin' compositor='moblin'
elif [[ -n $( grep 'kmscon' <<< "$ps_aux" ) ]];then elif [[ -z "${Ps_aux_Data/*kmscon*/}" ]];then
compositor='kmscon' compositor='kmscon'
elif [[ -n $( grep 'sway' <<< "$ps_aux" ) ]];then elif [[ -z "${Ps_aux_Data/*sway*/}" ]];then
compositor='sway' compositor='sway'
elif [[ -n $( grep 'grefson' <<< "$ps_aux" ) ]];then elif [[ -z "${Ps_aux_Data/*grefson*/}" ]];then
compositor='grefson' compositor='grefson'
elif [[ -n $( grep 'westford' <<< "$ps_aux" ) ]];then elif [[ -z "${Ps_aux_Data/*westford*/}" ]];then
compositor='westford' compositor='westford'
elif [[ -n $( grep 'rustland' <<< "$ps_aux" ) ]];then elif [[ -z "${Ps_aux_Data/*rustland*/}" ]];then
compositor='rustland' compositor='rustland'
elif [[ -n $( grep 'fireplace' <<< "$ps_aux" ) ]];then elif [[ -z "${Ps_aux_Data/*fireplace*/}" ]];then
compositor='fireplace' compositor='fireplace'
elif [[ -n $( grep 'wayhouse' <<< "$ps_aux" ) ]];then elif [[ -z "${Ps_aux_Data/*wayhouse*/}" ]];then
compositor='wayhouse' compositor='wayhouse'
elif [[ -n $( grep 'weston' <<< "$ps_aux" ) ]];then elif [[ -z "${Ps_aux_Data/*weston*/}" ]];then
compositor='weston' compositor='weston'
elif [[ -n $( grep 'compton' <<< "$ps_aux" ) ]];then elif [[ -z "${Ps_aux_Data/*compton*/}" ]];then
compositor='compton' compositor='compton'
elif [[ -n $( grep 'compiz' <<< "$ps_aux" ) ]];then elif [[ -z "${Ps_aux_Data/*compiz*/}" ]];then
compositor='compiz' compositor='compiz'
elif [[ -n $( grep 'swc' <<< "$ps_aux" ) ]];then elif [[ -z "${Ps_aux_Data/*swc*/}" ]];then
compositor='swc' compositor='swc'
elif [[ -n $( grep 'dwc' <<< "$ps_aux" ) ]];then elif [[ -z "${Ps_aux_Data/*dwc*/}" ]];then
compositor='dwc' compositor='dwc'
fi fi
@ -12798,15 +12793,15 @@ print_cpu_data()
IFS="$ORIGINAL_IFS" IFS="$ORIGINAL_IFS"
if [[ $B_EXTRA_DATA == 'true' && ${a_cpu_info[3]} != '' ]];then if [[ $B_EXTRA_DATA == 'true' && ${a_cpu_info[3]} != '' ]];then
arch=$( get_cpu_architecture "${a_cpu_info[3]}" "${a_cpu_info[4]}" "${a_cpu_info[5]}" ) get_cpu_architecture "${a_cpu_info[3]}" "${a_cpu_info[4]}" "${a_cpu_info[5]}"
# note: arm model names usually say what revision it is # note: arm model names usually say what revision it is
if [[ ${a_cpu_info[3]} != 'arm' && "${a_cpu_info[6]}" != '' ]];then if [[ ${a_cpu_info[3]} != 'arm' && "${a_cpu_info[6]}" != '' ]];then
if [[ -n "${arch/*rev*/}" ]];then if [[ -n "${ARCH/*rev*/}" ]];then
rev=" rev.${a_cpu_info[6]}" rev=" rev.${a_cpu_info[6]}"
fi fi
fi fi
if [[ "$arch" != '' ]];then if [[ "$ARCH" != '' ]];then
arch=" ($arch$rev)" arch=" ($ARCH$rev)"
arm='' # note: to avoid redundant output, only show this without -x option arm='' # note: to avoid redundant output, only show this without -x option
fi fi
fi fi
@ -13869,7 +13864,7 @@ print_module_version()
if [[ -z $( grep -E '^snd' <<< $modules ) ]];then if [[ -z $( grep -E '^snd' <<< $modules ) ]];then
prefix='snd_' # sound modules start with snd_ prefix='snd_' # sound modules start with snd_
fi fi
modules=$( tr '[A-Z]' '[a-z]' <<< "$modules" ) modules="${modules,,}"
modules=${modules//-/_} modules=${modules//-/_}
# special intel processing, generally no version info though # special intel processing, generally no version info though
if [[ $modules == 'hda intel' ]];then if [[ $modules == 'hda intel' ]];then

View file

@ -1,3 +1,18 @@
=====================================================================================
Version: 2.3.28
Patch Version: 00
Script Date: 2017-07-29
-----------------------------------
Changes:
-----------------------------------
New version, new tarball. This fixes a subtle gawk issue that could in some systems make -G
hang endlessly.
Also started on more optimizing, getting rid of as many subshells as possible.
-----------------------------------
-- Harald Hope - Sat, 29 Jul 2017 12:37:27 -0700
===================================================================================== =====================================================================================
Version: 2.3.27 Version: 2.3.27
Patch Version: 00 Patch Version: 00