fine tuned output a bit

This commit is contained in:
inxi-svn 2009-02-03 20:50:10 +00:00
parent cc85ccbce5
commit a99ff39449

32
inxi
View file

@ -1408,17 +1408,17 @@ get_cpu_core_count()
# match the numberic value to an alpha value
case $cpu_core_count in
1) cpu_alpha_count='single';;
2) cpu_alpha_count='dual';;
3) cpu_alpha_count='triple';;
4) cpu_alpha_count='quad';;
5) cpu_alpha_count='penta';;
6) cpu_alpha_count='hexa';;
7) cpu_alpha_count='hepta';;
8) cpu_alpha_count='octa';;
9) cpu_alpha_count='ennea';;
10) cpu_alpha_count='deca';;
*) cpu_alpha_count='multi';;
1) cpu_alpha_count='Single';;
2) cpu_alpha_count='Dual';;
3) cpu_alpha_count='Triple';;
4) cpu_alpha_count='Quad';;
5) cpu_alpha_count='Penta';;
6) cpu_alpha_count='Hexa';;
7) cpu_alpha_count='Hepta';;
8) cpu_alpha_count='Octa';;
9) cpu_alpha_count='Ennea';;
10) cpu_alpha_count='Deca';;
*) cpu_alpha_count='Multi';;
esac
# create array, core count integer; core count string
# A_CPU_CORE_DATA=( "$cpu_core_count" "$cpu_alpha_count Core$cpu_type" )
@ -2490,16 +2490,17 @@ print_short_data()
# set A_CPU_CORE_DATA
get_cpu_core_count
local cpc_plural=''
local cpc_plural='' cpu_count_print=''
local cpu_physical_count=${A_CPU_CORE_DATA[0]}
local cpu_core_count=${A_CPU_CORE_DATA[1]}
local cpu_type=${A_CPU_CORE_DATA[2]}
if [ "$cpu_physical_count" -gt 1 ];then
cpc_plural='(s)'
cpu_count_print="$cpu_physical_count "
fi
local cores_per_cpu=$(( $cpu_core_count / $cpu_physical_count ))
local cpu_data_string="${cpu_physical_count} ${cpu_core_count} core ${cpu_type}"
local cpu_data_string="${cpu_count_print}${cpu_core_count} core ${cpu_type}"
# local cpu_core_count=${A_CPU_CORE_DATA[0]}
# load A_HDD_DATA
@ -2662,16 +2663,17 @@ print_cpu_data()
# set A_CPU_CORE_DATA
get_cpu_core_count
local cpc_plural=''
local cpc_plural='' cpu_count_print=''
local cpu_physical_count=${A_CPU_CORE_DATA[0]}
local cpu_core_count=${A_CPU_CORE_DATA[1]}
local cpu_type=${A_CPU_CORE_DATA[2]}
if [ "$cpu_physical_count" -gt 1 ];then
cpc_plural='(s)'
cpu_count_print="$cpu_physical_count "
fi
local cores_per_cpu=$(( $cpu_core_count / $cpu_physical_count ))
local cpu_data_string="${cpu_physical_count} ${cpu_core_count} core ${cpu_type}"
local cpu_data_string="${cpu_count_print}${cpu_core_count} core ${cpu_type}"
# Strange (and also some expected) behavior encountered. If print_screen_output() uses $1
# as the parameter to output to the screen, then passing "<text1> ${ARR[@]} <text2>"
# will output only <text1> and first element of ARR. That "@" splits in elements and "*" _doesn't_,