2010-01-12 21:09:30 +01:00
|
|
|
# Wrapper to build the companion tools facilities
|
|
|
|
|
|
|
|
# List all companion tools facilities, and parse their scripts
|
|
|
|
CT_COMP_TOOLS_FACILITY_LIST=
|
|
|
|
for f in "${CT_LIB_DIR}/scripts/build/companion_tools/"*.sh; do
|
|
|
|
_f="$(basename "${f}" .sh)"
|
|
|
|
_f="${_f#???-}"
|
|
|
|
__f="CT_COMP_TOOLS_${_f}"
|
|
|
|
if [ "${!__f}" = "y" ]; then
|
2016-11-22 18:10:23 -08:00
|
|
|
CT_DoLog DEBUG "Enabling companion tool '${_f}'"
|
2010-01-12 21:09:30 +01:00
|
|
|
. "${f}"
|
|
|
|
CT_COMP_TOOLS_FACILITY_LIST="${CT_COMP_TOOLS_FACILITY_LIST} ${_f}"
|
|
|
|
else
|
2016-11-22 18:10:23 -08:00
|
|
|
CT_DoLog DEBUG "Disabling companion tool '${_f}'"
|
2010-01-12 21:09:30 +01:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Download the companion tools facilities
|
|
|
|
do_companion_tools_get() {
|
|
|
|
for f in ${CT_COMP_TOOLS_FACILITY_LIST}; do
|
|
|
|
do_companion_tools_${f}_get
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
# Extract and patch the companion tools facilities
|
|
|
|
do_companion_tools_extract() {
|
|
|
|
for f in ${CT_COMP_TOOLS_FACILITY_LIST}; do
|
|
|
|
do_companion_tools_${f}_extract
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
# Build the companion tools facilities
|
2016-11-22 18:10:23 -08:00
|
|
|
do_companion_tools_for_build() {
|
2010-01-12 21:09:30 +01:00
|
|
|
for f in ${CT_COMP_TOOLS_FACILITY_LIST}; do
|
2016-11-22 18:10:23 -08:00
|
|
|
do_companion_tools_${f}_for_build
|
2010-01-12 21:09:30 +01:00
|
|
|
done
|
|
|
|
}
|