make POSIX sh compliant

This commit is contained in:
2025-12-18 14:12:29 -08:00
parent 1f48d9808c
commit cdae221acf
11 changed files with 63 additions and 20 deletions

27
bin/espdev Executable file
View File

@ -0,0 +1,27 @@
#!/bin/sh
if [ $1 = "source" ]; then
echo "sourcing and exiting..."
. $HOME/esp/esp-idf/export.sh
exit
fi
. $HOME/esp/esp-idf/export.sh
echo "cleaning up..."
idf.py fullclean
echo "done cleaning."
echo "building..."
idf.py build
echo "done building."
echo "flashing..."
idf.py -p /dev/ttyACM0 flash
echo "done flashing."
read -n 1 input -p "monitor serial output? [y/n]"
if [ $input = y ]; then
echo "monitoring..."
idf.py -p /dev/ttyACM0 monitor
else if [ $input = n ]; then
exit
else
echo "yes or no dude..."
fi