From c6d9f658387e8025c113c6acb6b25c65de948829 Mon Sep 17 00:00:00 2001 From: "trash80.v2.0" Date: Thu, 28 May 2009 23:48:35 +0000 Subject: [PATCH] Still a gawk bug loomed. Fixed now. inxi will exit in Ubuntu with gawk requirement only now. (or any other distro gawk-less). --- inxi | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/inxi b/inxi index 99cd64c..36b7c5d 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.0.13 +#### version: 1.0.13-b2 #### Date: 28 May 2009 ######################################################################## #### SPECIAL THANKS @@ -234,7 +234,7 @@ DEFAULT_SCHEME=2 # Default indentation level INDENT=10 -# logging eval variables, start and end function: Insert to LOGFS LOGFE when debug level 9, 10 +# logging eval variables, start and end function: Insert to LOGFS LOGFE when debug level == 10 LOGFS_STRING='log_function_data fs $FUNCNAME "$( echo $@ )"' LOGFE_STRING='log_function_data fe $FUNCNAME' LOGFS='' @@ -341,17 +341,19 @@ BAN_LIST_CPU='' main() { eval $LOGFS - # first init function must be set first for colors etc. Remember, no debugger - # stuff works on this function unless you set the debugging flag manually. - # Debugging flag -@ [number] will not work until get_parameters runs. - # This function just initializes variables - initialize_script_data + # Check for dependencies BEFORE running ANYTHING else except above functions # Not all distro's have these depends installed by default check_script_depends check_script_suggested_apps + # first init function must be set first for colors etc. Remember, no debugger + # stuff works on this function unless you set the debugging flag manually. + # Debugging flag -@ [number] will not work until get_parameters runs. + # This function just initializes variables + initialize_script_data + ### Only continue if depends ok SCRIPT_PATH=$( dirname $0 ) SCRIPT_VERSION_NUMBER=$( grep -im 1 'version:' $SCRIPT_PATH/$SCRIPT_NAME | gawk '{print $3}' ) @@ -1033,7 +1035,7 @@ get_parameters() @) if [[ -n $( egrep "^([1-9]|10)$" <<< $OPTARG ) ]];then DEBUG=$OPTARG exec 2>&1 - # switch on logging only for -@ 9, 10 + # switch on logging only for -@ 10 if [[ $OPTARG -ge 9 ]];then if [[ $OPTARG -eq 10 ]];then B_LOG_COLORS='true'