e-bike-tracker-device/scripts/flash.sh
2022-06-10 01:28:39 +02:00

22 lines
458 B
Bash
Executable file

#!/usr/bin/env bash
set -e
BUILD_MODE=""
case "$1" in
""|"release")
bash scripts/build.sh
BUILD_MODE="release"
;;
"debug")
bash scripts/build.sh debug
BUILD_MODE="debug"
;;
*)
echo "Wrong argument. Only \"debug\"/\"release\" arguments are supported"
exit 1;;
esac
export ESP_ARCH=xtensa-esp32-espidf
web-flash --chip esp32 target/${ESP_ARCH}/${BUILD_MODE}/e-bike-tracker-device