#!/bin/bash

# get folder name, and set to [dir] variable. 
dir=${PWD##*/}
arduino-cli compile --fqbn esp32:esp32:m5stick-c --export-binaries --output-dir build ${dir}.ino

if [ -f ino_filename ]; then
  tmpfname=`cat ino_filename`
  fname="${tmpfname%.*}"
  echo ${fname}
  cp build/TestBuild.ino.bin build/${fname}.bin.img
fi
