From 949dea7af13c1b21b264cf6919a66b88fd349080 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Wed, 17 Dec 2008 04:09:01 +0000 Subject: [PATCH] (Version Change) Added 32/64 bit output on System -S line --- inxi | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/inxi b/inxi index d29671d..8a7d040 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 0.8.10 +#### version: 0.8.11 #### Date: December 16 2008 ######################################################################## #### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif @@ -198,7 +198,7 @@ SCRIPT_VERSION_NUMBER=$( grep -im 1 'version:' $SCRIPT_PATH/$SCRIPT_NAME | gawk SCRIPT_DOWNLOAD='http://inxi.googlecode.com/svn/trunk/' SCRIPT_DOWNLOAD_BRANCH_1='http://inxi.googlecode.com/svn/branches/one/' SCRIPT_DOWNLOAD_BRANCH_2='http://inxi.googlecode.com/svn/branches/two/' -SCRIPT_DOWNLOAD_DEV='http://techpatterns.com/downloads/distro/' +SCRIPT_DOWNLOAD_DEV='http://smxi.org/test/' KONVI_CFG="konversation/scripts/$SCRIPT_NAME.conf" # relative path to $(kde-config --path data) ### Script Localization @@ -1223,10 +1223,10 @@ get_cpu_core_count() ## main cpu data collector get_cpu_data() { - local i='' j='' cpu_array_nu='' a_cpu_working='' multi_cpu='' + local i='' j='' cpu_array_nu='' a_cpu_working='' multi_cpu='' bits='' IFS=$'\n' - A_CPU_DATA=($(gawk -F': ' ' + A_CPU_DATA=($(gawk -v -F': ' ' { IGNORECASE=1 } # TAKE NOTE: \t+ will work for /proc/cpuinfo, but SOME ARBITRARY FILE used for TESTING might contain SPACES! # Therefore PATCH to use [ \t]+ when TESTING! @@ -2692,17 +2692,23 @@ print_partition_data() print_system_data() { - local system_data='' + local system_data='' bits='' local host_name=$( hostname ) local current_kernel=$( uname -a | gawk '{print $1,$3,$(NF-1)}' ) local distro="$( get_distro_data )" + # check for 64 bit first + if [ -n "$( uname -m | grep -o 'x86_64' )" ];then + bits="(64 bit)" + else + bits="(32 bit)" + fi if [[ $B_SHOW_HOST == 'true' ]];then - system_data=$( create_print_line "System:" "${C1}Host${C2} $host_name ${C1}running${C2} ${CN}" ) + system_data=$( create_print_line "System:" "${C1}Host${C2} $host_name ${C1}running${C2}" ) else system_data=$( create_print_line "System:" "${C1}running${C2} ${CN}" ) fi - system_data="$system_data ${C2}$current_kernel ${C1}Distro${C2} $distro ${CN}" + system_data="$system_data ${C2}$current_kernel $bits ${C1}Distro${C2} $distro" print_screen_output "$system_data" }