#!/bin/bash if [ -z "$1" ]; then echo "usage: flash.sh [/dev/tty-usb-device]" elif [ -z "$2" ]; then podman run --rm --privileged -v "${PWD}":/config -it ghcr.io/esphome/esphome run $1 else podman run --rm --privileged -v "${PWD}":/config --device=$2 -it ghcr.io/esphome/esphome run $1 fi