scripts/build/debug.sh
changeset 3159 fb71cad4b085
parent 483 99724e410693
     1.1 --- a/scripts/build/debug.sh	Sat May 03 09:53:49 2008 +0000
     1.2 +++ b/scripts/build/debug.sh	Thu Jan 10 00:27:13 2013 +0100
     1.3 @@ -3,11 +3,15 @@
     1.4  # List all debug facilities, and parse their scripts
     1.5  CT_DEBUG_FACILITY_LIST=
     1.6  for f in "${CT_LIB_DIR}/scripts/build/debug/"*.sh; do
     1.7 -    is_enabled=
     1.8 -    . "${f}"
     1.9 -    f=$(basename "${f}" .sh)
    1.10 -    if [ "${is_enabled}" = "y" ]; then
    1.11 -        CT_DEBUG_FACILITY_LIST="${CT_DEBUG_FACILITY_LIST} ${f#???-}"
    1.12 +    _f="$(basename "${f}" .sh)"
    1.13 +    _f="${_f#???-}"
    1.14 +    __f="CT_DEBUG_${_f}"
    1.15 +    if [ "${!__f}" = "y" ]; then
    1.16 +        CT_DoLog DEBUG "Enabling debug '${_f}'"
    1.17 +        . "${f}"
    1.18 +        CT_DEBUG_FACILITY_LIST="${CT_DEBUG_FACILITY_LIST} ${_f}"
    1.19 +    else
    1.20 +        CT_DoLog DEBUG "Disabling debug '${_f}'"
    1.21      fi
    1.22  done
    1.23