mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
(No Version Change)
Just some comment cleanups and small code cleanups.
This commit is contained in:
parent
8978b3e48b
commit
cc5fb242c4
12
inxi
12
inxi
|
@ -703,11 +703,13 @@ script_self_updater()
|
||||||
wget -q --spider $1$SCRIPT_NAME
|
wget -q --spider $1$SCRIPT_NAME
|
||||||
# then do the actual download, need to make sure it's good because we're -O overwriting file
|
# then do the actual download, need to make sure it's good because we're -O overwriting file
|
||||||
if [[ $? -eq 0 ]];then
|
if [[ $? -eq 0 ]];then
|
||||||
wget -q -O $SCRIPT_PATH/$SCRIPT_NAME $1$SCRIPT_NAME || error_handler 8 "$?"
|
wget -q -O $SCRIPT_PATH/$SCRIPT_NAME $1$SCRIPT_NAME
|
||||||
if [[ $? -eq 0 ]];then
|
if [[ $? -eq 0 ]];then
|
||||||
SCRIPT_VERSION_NUMBER=$( grep -im 1 'version:' $SCRIPT_PATH/$SCRIPT_NAME | gawk '{print $3}' )
|
SCRIPT_VERSION_NUMBER=$( grep -im 1 'version:' $SCRIPT_PATH/$SCRIPT_NAME | gawk '{print $3}' )
|
||||||
print_screen_output "Successfully updated to $2 version: $SCRIPT_VERSION_NUMBER\nTo run the new version, just start $SCRIPT_NAME again."
|
print_screen_output "Successfully updated to $2 version: $SCRIPT_VERSION_NUMBER\nTo run the new version, just start $SCRIPT_NAME again."
|
||||||
exit 0
|
exit 0
|
||||||
|
else
|
||||||
|
error_handler 8 "$?"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
error_handler 8 "$?"
|
error_handler 8 "$?"
|
||||||
|
@ -854,7 +856,8 @@ get_start_client()
|
||||||
else {
|
else {
|
||||||
printf $i" "
|
printf $i" "
|
||||||
}
|
}
|
||||||
}exit
|
}
|
||||||
|
exit
|
||||||
}' )"
|
}' )"
|
||||||
IRC_CLIENT="KVIrc"
|
IRC_CLIENT="KVIrc"
|
||||||
;;
|
;;
|
||||||
|
@ -1131,6 +1134,7 @@ get_distro_data()
|
||||||
distro=$( remove_erroneous_chars "/etc/$distro_file" )
|
distro=$( remove_erroneous_chars "/etc/$distro_file" )
|
||||||
# otherwise try the default debian/ubuntu /etc/issue file
|
# otherwise try the default debian/ubuntu /etc/issue file
|
||||||
elif [[ -f /etc/issue ]];then
|
elif [[ -f /etc/issue ]];then
|
||||||
|
# lsb gives more manageable and accurate output than issue, but mint should use issue for now
|
||||||
if [[ -f /etc/lsb-release && -z $( grep -i 'mint' /etc/issue ) ]];then
|
if [[ -f /etc/lsb-release && -z $( grep -i 'mint' /etc/issue ) ]];then
|
||||||
distro=$( get_distro_lsb_data )
|
distro=$( get_distro_lsb_data )
|
||||||
else
|
else
|
||||||
|
@ -1522,7 +1526,6 @@ get_hard_drive_data_advanced()
|
||||||
# discovered disk name AND ends with the correct identifier, sdx
|
# discovered disk name AND ends with the correct identifier, sdx
|
||||||
# get rid of whitespace for some drive names and ids, and extra data after - in name
|
# get rid of whitespace for some drive names and ids, and extra data after - in name
|
||||||
temp_name=$( tr ' ' '_' <<< ${a_temp_scsi[$j]} | cut -d '-' -f 1 )
|
temp_name=$( tr ' ' '_' <<< ${a_temp_scsi[$j]} | cut -d '-' -f 1 )
|
||||||
|
|
||||||
sd_ls_by_id=$( egrep -m1 ".*$temp_name.*${a_temp_working[0]}$" <<< "$ls_disk_by_id" )
|
sd_ls_by_id=$( egrep -m1 ".*$temp_name.*${a_temp_working[0]}$" <<< "$ls_disk_by_id" )
|
||||||
|
|
||||||
if [[ -n $sd_ls_by_id ]];then
|
if [[ -n $sd_ls_by_id ]];then
|
||||||
|
@ -1903,9 +1906,8 @@ print_cpu_data()
|
||||||
local bmip_data='' cpu_cache='' cpu_vendor='' cpu_flags=''
|
local bmip_data='' cpu_cache='' cpu_vendor='' cpu_flags=''
|
||||||
|
|
||||||
##print_screen_output "A_CPU_DATA[0]=\"${A_CPU_DATA[0]}\""
|
##print_screen_output "A_CPU_DATA[0]=\"${A_CPU_DATA[0]}\""
|
||||||
# Array A_CPU_DATA always has one element: max clockfreq found.
|
# Array A_CPU_DATA always has one extra element: max clockfreq found.
|
||||||
# that's why its count is one more than you'd think from cores/cpus alone
|
# that's why its count is one more than you'd think from cores/cpus alone
|
||||||
# weird hack, probably should be changed
|
|
||||||
# load A_CPU_DATA
|
# load A_CPU_DATA
|
||||||
get_cpu_data
|
get_cpu_data
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue