make POSIX sh compliant
This commit is contained in:
27
bin/espdev
Executable file
27
bin/espdev
Executable 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
|
||||
Reference in New Issue
Block a user