Here is the review of today's refactoring session on some ksh scripts.
#!/bin/ksh
##########################
## Variable definition
##########################
logInfo "Variable definition"
SH_DIR=something
BASE_DIR=something/else
SCRIPT_DIR=other/stupid/path
#############################
##Functions
#############################
function sourceLogInitScript {
. $SH_DIR/.logInit
}
################
# Main
################
sourceLogInitScript
#Other stupid code lines and comments
Unfortunately, logInfo is defined in .logInit as are variables BASE_DIR and SCRIPT_DIR. I guess it is too boring to have a look at a script where 50% of the functionality you are scripting is written. Of course, logInfo not found error is displayed at execution, but why giving a fucking damn at errors when you are testing your stuff??? Silly idea, right ?
I avoid mentioning the comments that seem to be there to make the script look bigger and sooo hard to understand...