mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
fine tunings to avoid some possible errors
This commit is contained in:
parent
0473aef0a0
commit
96784d1073
35
inxi
35
inxi
|
@ -3,7 +3,7 @@
|
|||
#### Script Name: inxi
|
||||
#### version: 1.7.13
|
||||
#### Date: July 5 2011
|
||||
#### Patch Number: 07
|
||||
#### Patch Number: 08
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
########################################################################
|
||||
|
@ -3485,6 +3485,8 @@ get_gcc_kernel_version()
|
|||
|
||||
get_gcc_system_version()
|
||||
{
|
||||
eval $LOGFS
|
||||
local separator='' gcc_installed='' gcc_list='' gcc_others='' temp_array=''
|
||||
local gcc_version=$(
|
||||
gcc --version 2>/dev/null | sed -E 's/\([^\)]*\)//g' | gawk '
|
||||
BEGIN {
|
||||
|
@ -3495,25 +3497,30 @@ get_gcc_system_version()
|
|||
exit
|
||||
}'
|
||||
)
|
||||
local gcc_others=$( ls /usr/bin/gcc-* )
|
||||
local separator='' gcc_installed='' gcc_list=''
|
||||
|
||||
# can't use xargs -l basename because not all systems support thats
|
||||
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||
for item in $gcc_others
|
||||
do
|
||||
gcc_installed=$( basename $item | gawk -F '-' '
|
||||
$2 ~ /^[0-9\.]+$/ {
|
||||
print $2
|
||||
}' )
|
||||
if [[ -n $gcc_installed && -z $( grep "^$gcc_installed" <<< $gcc_version ) ]];then
|
||||
gcc_list=$gcc_list$separator$gcc_installed
|
||||
separator=','
|
||||
fi
|
||||
done
|
||||
gcc_others=$( ls /usr/bin/gcc-* 2>/dev/null )
|
||||
if [[ -n $gcc_others ]];then
|
||||
for item in $gcc_others
|
||||
do
|
||||
gcc_installed=$( basename $item | gawk -F '-' '
|
||||
$2 ~ /^[0-9\.]+$/ {
|
||||
print $2
|
||||
}' )
|
||||
if [[ -n $gcc_installed && -z $( grep "^$gcc_installed" <<< $gcc_version ) ]];then
|
||||
gcc_list=$gcc_list$separator$gcc_installed
|
||||
separator=','
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if [[ -n $gcc_version ]];then
|
||||
A_GCC_VERSIONS=( "$gcc_version" $gcc_list )
|
||||
fi
|
||||
temp_array=${A_GCC_VERSIONS[@]}
|
||||
log_function_data "A_GCC_VERSIONS: $temp_array"
|
||||
eval $LOGFE
|
||||
}
|
||||
get_gpu_temp_data()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue