mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-08 10:09:54 +00:00
Complain if an unsupported component is explicitly requested
In all.sh, when an explicit list of components is specified, error out if one of the components is not known or not supported. Patterns that happen to match zero components are still effectively ignored. Fix #2783 Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
39a3b11006
commit
e8056c5e31
|
@ -439,6 +439,24 @@ pre_parse_command_line () {
|
|||
COMMAND_LINE_COMPONENTS="$COMMAND_LINE_COMPONENTS *_armcc*"
|
||||
fi
|
||||
|
||||
if [ $all_except -eq 0 ]; then
|
||||
unsupported=0
|
||||
for component in $COMMAND_LINE_COMPONENTS; do
|
||||
case $component in
|
||||
*[*?\[]*) continue;;
|
||||
esac
|
||||
case " $SUPPORTED_COMPONENTS " in
|
||||
*" $component "*) :;;
|
||||
*)
|
||||
echo >&2 "Component $component was explicitly requested, but is not known or not supported."
|
||||
unsupported=$((unsupported + 1));;
|
||||
esac
|
||||
done
|
||||
if [ $unsupported -ne 0 ]; then
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
# Build the list of components to run.
|
||||
RUN_COMPONENTS=
|
||||
for component in $SUPPORTED_COMPONENTS; do
|
||||
|
|
Loading…
Reference in a new issue