Skip to content

Commit

Permalink
bin/lenovo_extract.sh: Verify target board prefix
Browse files Browse the repository at this point in the history
Verify if the target board prefix matches, instead of the full name.

Signed-off-by: Marcello Sylvester Bauer <sylv@sylv.io>
  • Loading branch information
sylv-io authored and PatrickRudolph committed Apr 24, 2020
1 parent fe1f1ee commit f57fd22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/lenovo_extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ if [ -z "$BOARD" ]; then
exit 1;
fi

# verify target board prefix
for supported in "${SUPPORTED[@]}"; do
[ "$BOARD" == "$supported" ] && _FOUND="y" && break
[[ $BOARD == ${supported}* ]] && _FOUND="y" && BOARD="$supported" && break
done

if [ -z "$_FOUND" ]; then
Expand Down

0 comments on commit f57fd22

Please sign in to comment.