Files
esp-idf-tools/custom_bin/rebuild-interactive
T
2025-11-18 09:11:56 -07:00

56 lines
1.2 KiB
Bash

#!/bin/bash
set -e # fail on any error
echo -e "\nFully Rebuildan~\n"
# total clean
bash fullclean
# use setup script instead
setup
echo -e "\nErase flash? y/n"
read wipe
if [ "$wipe" == "y" ]; then
# echo -e "\nExecuting erase-flash\n"
# idf.py --preview erase-flash
# echo -e "\nFlash wiped\n"
bash erase-flash
fi
echo -e "\nRun menuconfig y/n?\n"
read menuconfig
if [ "$menuconfig" == "y" ]; then
echo -e "\nExecuting menuconfig\n"
idf.py --preview menuconfig
echo -e "\nConfig Complete\n"
fi
echo -e "\nSave as Default Config? y/n?\n"
read defconfig
if [ "$defconfig" == "y" ]; then
# echo -e "\nExecuting save-defconfig\n"
# idf.py --preview save-defconfig
# echo -e "\nDefault Config Saved\n"
bash save-defconfig
fi
echo -e "\nBuild, Flash, and Monitor Now? y/n"
read flashmon
if [ "$flashmon" == "y" ]; then
echo -e "\nBuild, Flashing, and Monitoran~\n"
idf.py --preview flash
echo -e "\nFlashed... Short Delay Before Monitor\n"
sleep 1
idf.py --preview monitor
else
echo -e "\nBuild Now? y/n"
read build
if [ "$build" == "y" ]; then
echo -e "\nBuildan~\n"
idf.py --preview build
echo -e "\nBuild complete\n"
fi
fi
echo -e "\nAll done :3\n"