From 26a8fdfc2ccc1a935d8e2821d18907840cc66a2a Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Tue, 28 Mar 2006 18:21:47 +0000 Subject: [PATCH] Added verbosity envar. --- common/common-functions | 1 - master.sh | 31 ++++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/common/common-functions b/common/common-functions index 0c18ebe..f57190a 100644 --- a/common/common-functions +++ b/common/common-functions @@ -122,7 +122,6 @@ ${DD_BORDER} } version=" - ${BOLD} \"jhalfs-X\"${OFF} builder tool (development) \$Rev$ \$Date$ diff --git a/master.sh b/master.sh index f15d1a3..d203e03 100755 --- a/master.sh +++ b/master.sh @@ -41,32 +41,33 @@ fi PROGNAME=$(basename $0) COMMON_DIR="common" - PACKAGE_DIR=$(echo $PROGNAME | tr [a-z] [A-Z]) + PACKAGE_DIR=$(echo $PROGNAME | tr [a-z] [A-Z]) MODULE=$PACKAGE_DIR/master.sh MODULE_CONFIG=$PACKAGE_DIR/config + VERBOSITY=0 -echo -n "Loading common-functions module..." +[[ $VERBOSITY > 0 ]] && echo -n "Loading common-functions module..." source $COMMON_DIR/common-functions [[ $? > 0 ]] && echo " $COMMON_DIR/common-functions did not load.." && exit -echo "OK" +[[ $VERBOSITY > 0 ]] && echo "OK" # -echo -n "Loading masterscript conf..." +[[ $VERBOSITY > 0 ]] && echo -n "Loading masterscript conf..." source $COMMON_DIR/config [[ $? > 0 ]] && echo "$COMMON_DIR/conf did not load.." && exit -echo "OK" +[[ $VERBOSITY > 0 ]] && echo "OK" # -echo -n "Loading config module <$MODULE_CONFIG>..." +[[ $VERBOSITY > 0 ]] && echo -n "Loading config module <$MODULE_CONFIG>..." source $MODULE_CONFIG [[ $? > 0 ]] && echo "$MODULE_CONFIG did not load.." && exit 1 -echo "OK" +[[ $VERBOSITY > 0 ]] && echo "OK" # -echo -n "Loading code module <$MODULE>..." +[[ $VERBOSITY > 0 ]] && echo -n "Loading code module <$MODULE>..." source $MODULE [[ $? > 0 ]] && echo "$MODULE did not load.." && exit 2 -echo "OK" +[[ $VERBOSITY > 0 ]] && echo "OK" # -echo "---------------${nl_}" +[[ $VERBOSITY > 0 ]] && echo "---------------${nl_}" #=========================================================== @@ -78,16 +79,16 @@ WC=${BOOK:+1} #*******************************************************************# -echo -n "Loading function ..." +[[ $VERBOSITY > 0 ]] && echo -n "Loading function ..." source $COMMON_DIR/func_check_version.sh [[ $? > 0 ]] && echo " function module did not load.." && exit 2 -echo "OK" +[[ $VERBOSITY > 0 ]] && echo "OK" -echo -n "Loading function ..." +[[ $VERBOSITY > 0 ]] && echo -n "Loading function ..." source $COMMON_DIR/func_validate_configs.sh [[ $? > 0 ]] && echo " function module did not load.." && exit 2 -echo "OK" -echo "---------------${nl_}" +[[ $VERBOSITY > 0 ]] && echo "OK" +[[ $VERBOSITY > 0 ]] && echo "---------------${nl_}" ###################################