From cc5fb242c470cc7f5a0b6cbe0969b4c9f3521b02 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Wed, 12 Nov 2008 19:21:24 +0000 Subject: [PATCH] (No Version Change) Just some comment cleanups and small code cleanups. --- inxi | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/inxi b/inxi index f0a10aa..40d2047 100755 --- a/inxi +++ b/inxi @@ -703,11 +703,13 @@ script_self_updater() wget -q --spider $1$SCRIPT_NAME # then do the actual download, need to make sure it's good because we're -O overwriting file 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 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." exit 0 + else + error_handler 8 "$?" fi else error_handler 8 "$?" @@ -854,7 +856,8 @@ get_start_client() else { printf $i" " } - }exit + } + exit }' )" IRC_CLIENT="KVIrc" ;; @@ -1131,6 +1134,7 @@ get_distro_data() distro=$( remove_erroneous_chars "/etc/$distro_file" ) # otherwise try the default debian/ubuntu /etc/issue file 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 distro=$( get_distro_lsb_data ) else @@ -1522,7 +1526,6 @@ get_hard_drive_data_advanced() # 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 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" ) if [[ -n $sd_ls_by_id ]];then @@ -1903,9 +1906,8 @@ print_cpu_data() local bmip_data='' cpu_cache='' cpu_vendor='' cpu_flags='' ##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 - # weird hack, probably should be changed # load A_CPU_DATA get_cpu_data