fix the same bug in the bash script

This commit is contained in:
zhiayang 2024-03-10 23:02:19 -04:00
parent 6703ed3b7d
commit 4c020421c9
No known key found for this signature in database
GPG key ID: 5E2F30AD6F08571F

View file

@ -157,15 +157,17 @@ if [ "$keyboard_shield" == "y" ]; then
if [ -n "${boards_revisions[$board_index]}" ]; then
read -a _valid_revisions <<< "${boards_revisions[$board_index]}"
_rev_choices=("${_valid_revisions[@]}")
for (( _i=0; _i<${#_valid_revisions}; _i++ )); do
if [ "${boards_default_revision[board_index]}" = "${_valid_revisions[_i]}" ]; then
_valid_revisions[_i]+=" (default)"
_rev_choices[_i]+=" (default)"
fi
done
echo ""
echo "MCU Board Revision:"
select opt in "${_valid_revisions[@]}" "Quit"; do
select opt in "${_rev_choices[@]}" "Quit"; do
case "$REPLY" in
''|*[!0-9]*) echo "Invalid option. Try another one."; continue;;