diff --git a/scripts/check-all-firmware-revisions.sh b/scripts/check-all-firmware-revisions.sh index b4f381d..8bb8e21 100755 --- a/scripts/check-all-firmware-revisions.sh +++ b/scripts/check-all-firmware-revisions.sh @@ -13,19 +13,15 @@ cd "$PARENT_PATH/../firmware" || exit EXCLUDED_DIR="translations" -IS_LEGACY="false" - for dir in */ ; do DEVICE=${dir%/} - # TODO: we excude t3w1 until we have releases on it. - if [[ $EXCLUDED_DIR == "$DEVICE" || $DEVICE == "t3w1" ]]; then continue; fi - is_legacy_for_device="$IS_LEGACY" + if [[ ! -d "$dir" ]]; then continue; fi + if [[ $EXCLUDED_DIR == "$DEVICE" ]]; then continue; fi + is_legacy_only="false" if [[ "$DEVICE" == "1" || "$DEVICE" == "2" ]]; then - is_legacy_for_device="true" - fi - if [ -d "$dir" ]; then - if ! "$PARENT_PATH/check-firmware-revisions.sh" "$DEVICE" "$is_legacy_for_device" ; then - exit 1 - fi; + is_legacy_only="true" fi + if ! "$PARENT_PATH/check-firmware-revisions.sh" "$DEVICE" "$is_legacy_only" ; then + exit 1 + fi; done