mirror of
https://github.com/tuya-cloudcutter/tuya-cloudcutter.git
synced 2026-02-19 21:51:18 +01:00
common_run - Make BK7231 filename check case-insensitive
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user