File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -191,9 +191,12 @@ pre_initialize_variables () {
191191
192192 # Gather the list of available components. These are the functions
193193 # defined in this script whose name starts with "component_".
194- # Parse the script with sed. This way we get the functions in the order
195- # they are defined.
196- ALL_COMPONENTS=$( sed -n ' s/^ *component_\([0-9A-Z_a-z]*\) *().*/\1/p' < " $0 " )
194+ # Parse the script with sed.
195+ #
196+ # This script is interpreted by `bash` and `declare -F` is supported,
197+ # functions defined in other files can be detected with `declare -F`
198+ ALL_COMPONENTS=$( declare -F | \
199+ sed -n ' s/^declare\ -f\ component_\([0-9A-Z_a-z]*\)$/\1/p' )
197200
198201 # For Linux platforms we run latest/earliest versions of clang and the
199202 # test_clang_opt function is only for FreeBSD. This condition removes
You can’t perform that action at this time.
0 commit comments