e-bike-tracker-device/scripts/flash.sh

23 lines
458 B
Bash
Raw Permalink Normal View History

2022-06-10 01:28:39 +02:00
#!/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