2022-01-11 23:53:38 +00:00
|
|
|
#!/usr/bin/env bash
|
2021-12-29 17:34:55 +00:00
|
|
|
|
|
|
|
set -e
|
2022-01-11 23:53:38 +00:00
|
|
|
set -u
|
2021-12-29 17:34:55 +00:00
|
|
|
|
2022-01-11 23:53:38 +00:00
|
|
|
export IDF_PATH="$PWD/esp-idf"
|
|
|
|
export IDF_EXPORT_QUIET=0
|
|
|
|
source "$IDF_PATH"/export.sh
|
2021-12-29 17:34:55 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 ]; then
|
|
|
|
idf.py flash -p $1
|
|
|
|
else
|
|
|
|
if [ "$#" -ne 0 ]; then
|
|
|
|
echo "Illegal number of parameters"
|
|
|
|
else
|
|
|
|
idf.py flash
|
|
|
|
fi
|
|
|
|
fi
|