Files
esp-idf-tools/custom_bin/rebuildfull
T
2024-11-12 04:31:08 -07:00

50 lines
889 B
Bash

#!/bin/bash
echo -e "\nFully Rebuildan~\n"
echo -e "\nRunning fullclean\n"
idf.py fullclean
echo -e "\nRunning manual delete tasks\n"
if [ -f build ]; then
echo -e "\nDeleting build dir\n"
rm -rf build
else
echo -e "\nNo build dir, skipping delete\n"
fi
if [ -f sdkconfig ]; then
echo -e "\nDeleting sdkconfig\n"
rm sdkconfig
else
echo -e "\nNo sdkconfig, skipping delete\n"
fi
if [ -f sdkconfig.old ]; then
echo -e "\nDeleting sdkconfig.old\n"
rm sdkconfig.old
else
echo -e "\nNo sdkconfig.old, skipping delete\n"
fi
echo -e "\nSetting up project for $ESPTARGET\n"
idf.py set-target $ESPTARGET
echo -e "\nErase flash? y/n"
read wipe
if [ "$wipe" == "y" ]; then
idf.py erase-flash
echo -e "\nFlash wiped\n"
fi
idf.py menuconfig
echo -e "\nBuild now? y/n"
read build
if [ "$build" == "y" ]; then
idf.py build
echo -e "\nBuild complete\n"
fi
echo -e "\nAll done :3\n"