richard@1727: # Wrapper to build the companion tools facilities richard@1727: richard@1727: # List all companion tools facilities, and parse their scripts richard@1727: CT_COMP_TOOLS_FACILITY_LIST= richard@1727: for f in "${CT_LIB_DIR}/scripts/build/companion_tools/"*.sh; do richard@1727: _f="$(basename "${f}" .sh)" richard@1727: _f="${_f#???-}" richard@1727: __f="CT_COMP_TOOLS_${_f}" richard@1727: if [ "${!__f}" = "y" ]; then richard@1727: CT_DoLog DEBUG "Enabling companion tools '${_f}'" richard@1727: . "${f}" richard@1727: CT_COMP_TOOLS_FACILITY_LIST="${CT_COMP_TOOLS_FACILITY_LIST} ${_f}" richard@1727: else richard@1727: CT_DoLog DEBUG "Disabling companion tools '${_f}'" richard@1727: fi richard@1727: done richard@1727: richard@1727: # Download the companion tools facilities richard@1727: do_companion_tools_get() { richard@1727: for f in ${CT_COMP_TOOLS_FACILITY_LIST}; do richard@1727: do_companion_tools_${f}_get richard@1727: done richard@1727: } richard@1727: richard@1727: # Extract and patch the companion tools facilities richard@1727: do_companion_tools_extract() { richard@1727: for f in ${CT_COMP_TOOLS_FACILITY_LIST}; do richard@1727: do_companion_tools_${f}_extract richard@1727: done richard@1727: } richard@1727: richard@1727: # Build the companion tools facilities richard@1727: do_companion_tools() { richard@1727: for f in ${CT_COMP_TOOLS_FACILITY_LIST}; do richard@1727: do_companion_tools_${f}_build richard@1727: done richard@1727: } richard@1727: