Load additional modules or configuration files only is requested.

This commit is contained in:
Manuel Canales Esparcia 2006-05-05 19:03:33 +00:00
parent b240ee6f1b
commit 1ee8ad5603

View file

@ -56,11 +56,6 @@ source $COMMON_DIR/config
[[ $? > 0 ]] && echo "$COMMON_DIR/conf did not load.." && exit [[ $? > 0 ]] && echo "$COMMON_DIR/conf did not load.." && exit
[[ $VERBOSITY > 0 ]] && echo "OK" [[ $VERBOSITY > 0 ]] && echo "OK"
# #
[[ $VERBOSITY > 0 ]] && echo -n "Loading compare module..."
source $COMMON_DIR/func_compare.sh
[[ $? > 0 ]] && echo "$COMMON_DIR/func_compare.sh did not load.." && exit
[[ $VERBOSITY > 0 ]] && echo "OK"
#
[[ $VERBOSITY > 0 ]] && echo -n "Loading config module <$MODULE_CONFIG>..." [[ $VERBOSITY > 0 ]] && echo -n "Loading config module <$MODULE_CONFIG>..."
source $MODULE_CONFIG source $MODULE_CONFIG
[[ $? > 0 ]] && echo "$MODULE_CONFIG did not load.." && exit 1 [[ $? > 0 ]] && echo "$MODULE_CONFIG did not load.." && exit 1
@ -445,6 +440,15 @@ if [ x$ANSWER != "xyes" ] ; then
fi fi
echo "${nl_}${SD_BORDER}${nl_}" echo "${nl_}${SD_BORDER}${nl_}"
# Loadd additional modules or configuration files based on global settings
# compare module
if [[ "$COMPARE" = "1" ]]; then
[[ $VERBOSITY > 0 ]] && echo -n "Loading compare module..."
source $COMMON_DIR/func_compare.sh
[[ $? > 0 ]] && echo "$COMMON_DIR/func_compare.sh did not load.." && exit
[[ $VERBOSITY > 0 ]] && echo "OK"
fi
# Prevents setting "-d /" by mistake. # Prevents setting "-d /" by mistake.
if [ $BUILDDIR = / ] ; then if [ $BUILDDIR = / ] ; then