diff --git a/common_run.sh b/common_run.sh index a200558..22fe304 100644 --- a/common_run.sh +++ b/common_run.sh @@ -17,8 +17,8 @@ rm -f profile.txt if ! [ -z "${FIRMWARE}" ]; then LOCAL_PROFILE=$(echo "${PROFILE}" | sed 's/\/work\///g') CHIP=$(cat "${LOCAL_PROFILE}" | grep -o '"chip": "[^"]*' | grep -o '[^"]*$') - if grep -q "BK7231" <<< "${FIRMWARE}"; then - if ! grep -q "${CHIP}" <<< "${FIRMWARE}"; then + if grep -iq "BK7231" <<< "${FIRMWARE}"; then + if ! grep -iq "${CHIP}" <<< "${FIRMWARE}"; then echo "WARNING: Flashing a firmware for the wrong chip may soft-brick your device requiring a serial flash to recover." echo "You have selected a profile for chip type ${CHIP} but the selected firmware filename (${FIRMWARE}) indicates it may be for another chip." read -p "Are you sure want to proceed? Type 'PROCEED' (case-sensitive) to continue or 'exit' to stop (exit/PROCEED): " doublecheck