diff --git a/11_write_factorytest.sh b/11_write_factorytest.sh index b037c20..0ab2c39 100755 --- a/11_write_factorytest.sh +++ b/11_write_factorytest.sh @@ -4,8 +4,8 @@ # Get esptool command BUILD_TOOL=$(lib_get_esptool_command) -# BUILD_TOOLの文字列の長さが20以上の場合は、終了する -if [ ${#BUILD_TOOL} -ge 20 ]; then +# BUILD_TOOLの文字列の長さが25以上の場合は、終了する +if [ ${#BUILD_TOOL} -ge 25 ]; then echo $BUILD_TOOL echo "===" echo "Please execute the script again." diff --git a/54_write_sample.sh b/54_write_sample.sh index ee59885..707807a 100755 --- a/54_write_sample.sh +++ b/54_write_sample.sh @@ -4,8 +4,8 @@ # Get esptool command BUILD_TOOL=$(lib_get_esptool_command) -# BUILD_TOOLの文字列の長さが20以上の場合は、終了する -if [ ${#BUILD_TOOL} -ge 20 ]; then +# BUILD_TOOLの文字列の長さが25以上の場合は、終了する +if [ ${#BUILD_TOOL} -ge 25 ]; then echo $BUILD_TOOL echo "===" echo "Please execute the script again." diff --git a/94_write_factorytest.sh b/94_write_factorytest.sh index aa0f20f..52cbc6a 100755 --- a/94_write_factorytest.sh +++ b/94_write_factorytest.sh @@ -4,8 +4,8 @@ # Get esptool command BUILD_TOOL=$(lib_get_esptool_command) -# BUILD_TOOLの文字列の長さが20以上の場合は、終了する -if [ ${#BUILD_TOOL} -ge 20 ]; then +# BUILD_TOOLの文字列の長さが25以上の場合は、終了する +if [ ${#BUILD_TOOL} -ge 25 ]; then echo $BUILD_TOOL echo "===" echo "Please execute the script again." diff --git a/98_write4plus.sh b/98_write4plus.sh index 72f962f..682af57 100755 --- a/98_write4plus.sh +++ b/98_write4plus.sh @@ -4,8 +4,8 @@ # Get esptool command BUILD_TOOL=$(lib_get_esptool_command) -# BUILD_TOOLの文字列の長さが20以上の場合は、終了する -if [ ${#BUILD_TOOL} -ge 20 ]; then +# BUILD_TOOLの文字列の長さが25以上の場合は、終了する +if [ ${#BUILD_TOOL} -ge 25 ]; then echo $BUILD_TOOL echo "===" echo "Please execute the script again." diff --git a/lib.sh b/lib.sh index 81b0e57..39432cc 100644 --- a/lib.sh +++ b/lib.sh @@ -8,10 +8,10 @@ # check python command if ! command -v $PYTHON &> /dev/null then - PYTHON="python3" + PYTHON="python3.13" if ! command -v $PYTHON &> /dev/null then - echo "エラー:Pythonコマンドを使用するため、まずPythonをインストールしてください。" + echo "エラー:Pythonコマンドを使用するため、まずPythonをインストールしてください。またはlib.shの5行目や12行目を python3.13 等の実行可能なコマンド名に変更してください。" echo "$PYTHON could not be found. Please install it first." exit 1 fi @@ -88,7 +88,8 @@ "CYGWIN"*|"MINGW"*|"MSYS"*) # Windows (Git Bash, Cygwin, etc.) # For Windows, try to detect COM ports # Note: This works in Git Bash or similar environments - for num in {3..20}; do + # echo $OS_TYPE + for num in {4..20}; do if [ -e "/dev/ttyS$((num-1))" ]; then PORT="COM$num" break @@ -142,4 +143,4 @@ echo " Windows: COM3, COM4, etc." echo "エラー:デバイスが接続されていない?" exit 1 -} \ No newline at end of file +} diff --git a/m5latest.sh b/m5latest.sh index 1c0db5f..cbf3131 100755 --- a/m5latest.sh +++ b/m5latest.sh @@ -100,8 +100,8 @@ if [ $yn = "y" ]; then # Get esptool command BUILD_TOOL=$(lib_get_esptool_command) - # BUILD_TOOLの文字列の長さが20以上の場合は、終了する - if [ ${#BUILD_TOOL} -ge 20 ]; then + # BUILD_TOOLの文字列の長さが25以上の場合は、終了する + if [ ${#BUILD_TOOL} -ge 25 ]; then echo $BUILD_TOOL echo "===" echo "Please execute the script again." diff --git a/upload_by_hash.sh b/upload_by_hash.sh index 5eb771f..3e4c25f 100755 --- a/upload_by_hash.sh +++ b/upload_by_hash.sh @@ -38,8 +38,8 @@ # 書き込みを行う # Get esptool command BUILD_TOOL=$(lib_get_esptool_command) -# BUILD_TOOLの文字列の長さが20以上の場合は、終了する -if [ ${#BUILD_TOOL} -ge 20 ]; then +# BUILD_TOOLの文字列の長さが25以上の場合は、終了する +if [ ${#BUILD_TOOL} -ge 25 ]; then echo $BUILD_TOOL echo "===" echo "Please execute the script again."