diff --git a/README.md b/README.md index 25f360b..4591752 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Literally the most schizophrenically overengineered thing I have ever made. idk ## Quick start 1. `git clone https://github.com/PrincessPi3/esp-idf-tools.git ~/esp-idf-tools` 2. `bash ~/esp-idf-tools/esp-idf-tools-cmd.sh` -3. `source ~/.zshrc` +3. `source ~/.zshrc` 4. `get-esp-tools` ## Usage diff --git a/add-to-export-sh.txt b/add-to-export-sh.txt index 28ad9c1..2553112 100644 --- a/add-to-export-sh.txt +++ b/add-to-export-sh.txt @@ -34,12 +34,12 @@ for line in $(dmesg | tail -50 | grep -o -E "tty[A-Z]{3}[0-9]{0,2}" | sort -u); COUNTER=$((COUNTER+1)) done -if [ -z "$devArr" ]; then - echo -e "\nNo Serial Devices Found, Select one later with 'changeport'\n" -else +if [ $COUNTER -gt 0 ]; then echo -e "\nEnter TTY Number You'd Like:" read tty ttyselect=$devarr[(($tty+1))] +else + echo -e "\nNo Serial Devices Found, Select one later with 'changeport'\n" fi echo -e "Set esp target:\n\tOne of: $(getTargets)" diff --git a/custom_bin/changeport.sh b/custom_bin/changeport.sh index 7af8419..5a7b5f2 100644 --- a/custom_bin/changeport.sh +++ b/custom_bin/changeport.sh @@ -1,16 +1,21 @@ function subprocess() { echo -e "\nChanging ESPPORT\n" - echo -e "TTY devices found in dmesg:" + echo -e "\nChecking for Serial Devices in dmesg\n" COUNTER=0 devarr=() for line in $(dmesg | tail -50 | grep -o -E "tty[A-Z]{3}[0-9]{0,2}" | sort -u); do - echo "$COUNTER /dev/$line" + echo -e "$COUNTER /dev/$line" devarr+=("/dev/$line") COUNTER=$((COUNTER+1)) done - - echo -e "\nEnter TTY Number You'd Like:" - read tty + + if [ $COUNTER -gt 0 ]; then + echo -e "\nEnter TTY Number You'd Like:" + read tty + ttyselect=$devarr[(($tty+1))] + else + echo -e "\nNo Serial Devices Found, Select one later with 'changeport'\n" +fi sel=$tty+1 eval "$1=$devarr[$sel]" diff --git a/todo.txt b/todo.txt index 0c51759..e9e8349 100644 --- a/todo.txt +++ b/todo.txt @@ -6,25 +6,39 @@ x espinfo x changetarget x changebaud x clean +x fullclean x help-esp-tools x run-esp-cmd [help h -h --help] -flashmonitor -monitor +x flashmonitor +x monitor +x step-flash-monitor +x menuconfig +x imagesize +x create-project +x rebuildfull +x chipinfo +x esp-install-monitor +x esp-install-logs +run-esp-cmd n +fresh install from nothing -text export and changeesp -test help on cmd, help-esp-tools -test sourced scrips changebaud, changeesp, changeport -test menuconfig, monitor, flashmonitor, exit-esp-tools -test / fix / remove esp-idf-tools-cmd.sh options -reboot immediately when reset is set to 0 mins -remove unneeded code -check header on install version log audit readme maybe pretty up -test all for bugs -add error handling to changeesp, changeport, and export on esp and port functions +remove unneeded code + +add new stuff to error checking + +x text export and changeesp +x test help on cmd, help-esp-tools +x test sourced scrips changebaud, changeesp, changeport +x test menuconfig, monitor, flashmonitor, exit-esp-tools +x test / fix / remove esp-idf-tools-cmd.sh options +x reboot immediately when reset is set to 0 mins +x check header on install version lo + +x add error handling to changeesp, changeport, and export on esp and port functions figure out esp32 disable sanity check create blank project as master