From 241dc099b44026da99fa90f03e205b07c5e0c410 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Tue, 11 Nov 2008 19:34:25 +0000 Subject: [PATCH] (Change Version) Final step: moved the error output switch to end of get_parameters. This lets you trigger the debugger -@ flag without having to actually alter the code of inxi manually. This might occasionally create undesired error output, but that's a good thing, since that error output should be seen so we can know what the error is. --- inxi | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/inxi b/inxi index f3dd3c9..2f4c5a1 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 0.5.12 +#### version: 0.5.13 #### Date: November 11 2008 ######################################################################## #### inxi is a fork of infobash, the original bash sys info script by locsmif @@ -129,12 +129,8 @@ DCOPOBJ="default" DEBUG=0 # Set debug levels from 1-10 # Debug Buffer Index, index into a debug buffer storing debug messages until inxi is 'all up' DEBUG_BUFFER_INDEX=0 -### Reroute all error messages to the bitbucket (if not debugging) -if [[ $DEBUG -eq 0 ]] -then - exec 2>/dev/null -fi -#((DEBUG)) && exec 2>&1 # This is for debugging konversation +## note: the debugger rerouting to /dev/null has been moved to the end of the get_parameters function +## so -@[number] debug levels can be set if there is a failure, otherwise you can't even see the errors # Defaults to 2, make this 1 for normal, 0 for no colorcodes at all. Set to any other valid scheme you like. # Same as runtime parameter. @@ -481,7 +477,7 @@ get_cmdline() while read -d $'\0' L && [ "$i" -lt 32 ] do A_CMDL[i++]="$L" ## note: make sure this is valid - What does L mean? ## - done /dev/null + fi + #((DEBUG)) && exec 2>&1 # This is for debugging konversation } ## print out help menu, not including Testing or Debugger stuff because it's not needed