updoots and fixans
This commit is contained in:
@@ -1 +1,3 @@
|
|||||||
|
echo "\nBuilding\n"
|
||||||
idf.py build
|
idf.py build
|
||||||
|
echo "\nAll done :3\n"
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
echo "\nCleaning...\n"
|
||||||
|
idf.py clean
|
||||||
|
echo "\nAll done :3\n"
|
||||||
+18
-1
@@ -1 +1,18 @@
|
|||||||
idf.py fullclean && rmdir build && rm sdkconfig sdkconfig.old
|
idf.py fullclean
|
||||||
|
|
||||||
|
if [ -d build ]; then
|
||||||
|
echo "\nDeleting build dir\n"
|
||||||
|
rm -rf build
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f sdkconfig ]; then
|
||||||
|
echo "\nDeleting sdkconfig\n"
|
||||||
|
rm sdkconfig
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f sdkconfig.old ]; then
|
||||||
|
echo "\nDeleting sdkconfig.old\n"
|
||||||
|
rm sdkconfig.old
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "\nAll done :3\n"
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
idf.py fullclean
|
|
||||||
|
|
||||||
if [ -f build ]; then
|
|
||||||
rm -rf build
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f sdkconfig ]; then
|
|
||||||
rm sdkconfig
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f sdkconfig.old ]; then
|
|
||||||
rm sdkconfig.old
|
|
||||||
fi
|
|
||||||
|
|
||||||
idf.py set-target $ESPTARGET
|
|
||||||
idf.py menuconfig
|
|
||||||
idf.py build
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
idf.py fullclean
|
||||||
|
|
||||||
|
if [ -f build ]; then
|
||||||
|
echo -e "\nDeleting build dir\n"
|
||||||
|
rm -rf build
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f sdkconfig ]; then
|
||||||
|
echo -e "\nDeleting sdkconfig\n"
|
||||||
|
rm sdkconfig
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f sdkconfig.old ]; then
|
||||||
|
echo -e "\nDeleting sdkconfig.old\n"
|
||||||
|
rm sdkconfig.old
|
||||||
|
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"
|
||||||
+3
-1
@@ -1,2 +1,4 @@
|
|||||||
|
echo "\nSetting up for $ESPTARGET\n"
|
||||||
idf.py set-target $ESPTARGET
|
idf.py set-target $ESPTARGET
|
||||||
idf.py menuconfig
|
idf.py menuconfig
|
||||||
|
echo -e "\nAll done :3\n"
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
###############################################
|
###############################################
|
||||||
# begin esp-idf stuffss I made ################
|
# begin esp-idf stuffss I made ################
|
||||||
###############################################
|
###############################################
|
||||||
@@ -36,7 +39,7 @@ echo "ESPTARGET = $ESPTARGET"
|
|||||||
echo "Changing dir to ~/esp"
|
echo "Changing dir to ~/esp"
|
||||||
cd ~/esp
|
cd ~/esp
|
||||||
|
|
||||||
echo "All done :3 Enjoy your esp-idf environment"
|
echo "All done :3\n\tEnjoy your esp-idf environment"
|
||||||
|
|
||||||
###############################################
|
###############################################
|
||||||
# end esp-idf stuffss I made ##################
|
# end esp-idf stuffss I made ##################
|
||||||
|
|||||||
+25
-24
@@ -1,63 +1,64 @@
|
|||||||
echo "===== LFGGGGGGGG ======"
|
echo "\n===== LFGGGGGGGG ======\n"
|
||||||
|
|
||||||
echo "Setting up environment"
|
echo "\nInstalling prerequisites\n"
|
||||||
current_dir=$PWD
|
sudo apt install -y git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
|
||||||
|
|
||||||
echo "cleaning up environment"
|
echo "\nCleaning up environment\n"
|
||||||
if ! [ -d ~/esp ]; then
|
if ! [ -d ~/esp ]; then
|
||||||
echo "~/esp not found, creating\n"
|
echo "\n~/esp not found, creating\n"
|
||||||
mkdir ~/esp
|
mkdir ~/esp
|
||||||
else
|
else
|
||||||
echo "~/esp found, skipping\n"
|
echo "\n~/esp found, skipping\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d ~/esp/esp-idf ]; then
|
if [ -d ~/esp/esp-idf ]; then
|
||||||
echo "~/esp/esp-idf found, deleting\n"
|
echo "\n~/esp/esp-idf found, deleting\n"
|
||||||
rm -rf ~/esp/esp-idf
|
rm -rf ~/esp/esp-idf
|
||||||
else
|
else
|
||||||
echo "~/esp/esp-idf not found, skipping\n"
|
echo "\n~/esp/esp-idf not found, skipping\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d ~/.espressif ]; then
|
if [ -d ~/.espressif ]; then
|
||||||
echo "~/.espressif found, deleting\n"
|
echo "\n~/.espressif found, deleting\n"
|
||||||
rm -rf ~/.espressif
|
rm -rf ~/.espressif
|
||||||
else
|
else
|
||||||
echo "~/.espressif not found, skipping\n"
|
echo "\n~/.espressif not found, skipping\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d ~/esp/.custom_bin ]; then
|
if [ -d ~/esp/.custom_bin ]; then
|
||||||
echo "~/esp/.custom_bin found, deleting\n"
|
echo "\n~/esp/.custom_bin found, deleting\n"
|
||||||
rm -rf ~/esp/.custom_bin
|
rm -rf ~/esp/.custom_bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "nPlacing and enablig custom bins\n"
|
echo "\nPlacing and enabeling custom bins\n"
|
||||||
cp -r .custom_bin ~/esp
|
cp -r .custom_bin ~/esp
|
||||||
chmod +x ~/esp/.custom_bin/*
|
chmod +x ~/esp/.custom_bin/*
|
||||||
|
|
||||||
echo "\n\nPulling latest esp-idf code from github\n\n"
|
echo "\nPulling latest esp-idf code from github\n"
|
||||||
git clone --recursive --jobs 5 https://github.com/espressif/esp-idf.git ~/esp/esp-idf
|
git clone --recursive --jobs 5 https://github.com/espressif/esp-idf.git ~/esp/esp-idf
|
||||||
|
|
||||||
echo "\n\nRunning install script\n\n"
|
echo "\nRunning install script\n"
|
||||||
~/esp/esp-idf/install.sh all --enable-*
|
bash ~/esp/esp-idf/install.sh all
|
||||||
|
|
||||||
echo "\n\nInstalling optional tools\n\n"
|
echo "\nInstalling optional tools\n"
|
||||||
python ~/esp/esp-idf/tools/idf_tools.py install all
|
python ~/esp/esp-idf/tools/idf_tools.py install all
|
||||||
|
|
||||||
if ! [ -z $(alias | grep get_idf) ]; then
|
if ! [ -z $(alias | grep get_idf) ]; then
|
||||||
echo "get_idf alias not found, appending to ~/.zshrc\n"
|
echo "\nget_idf alias not found, appending to ~/.zshrc\n"
|
||||||
echo "alias get_idf='. ~/esp/esp-idf/export.sh'" >> ~/.zshrc
|
echo "alias get_idf='. ~/esp/esp-idf/export.sh'" >> ~/.zshrc
|
||||||
else
|
else
|
||||||
echo "get_idf alias already installed, skipping\n"
|
echo "\nget_idf alias already installed, skipping\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Making copy of ~/esp/esp-idf/export.sh to ~/esp/esp-idf/export.sh.bak\n"
|
echo "\nMaking a backup of ~/esp/esp-idf/export.sh to ~/esp/esp-idf/export.sh.bak\n"
|
||||||
cp ~/esp/esp-idf/export.sh ~/esp/esp-idf/export.sh.bak
|
cp ~/esp/esp-idf/export.sh ~/esp/esp-idf/export.sh.bak
|
||||||
|
|
||||||
echo "editing ~/esp/esp-idf/export.sh\n"
|
echo "\nEditing ~/esp/esp-idf/export.sh\n"
|
||||||
sed -i 's/return 0/# return 0/g' ~/esp/esp-idf/export.sh
|
sed -i 's/return 0/# return 0/g' ~/esp/esp-idf/export.sh
|
||||||
|
|
||||||
echo "appending custom additions to ~/esp/esp-idf/export.sh\n"
|
echo "\nAppending custom additions to ~/esp/esp-idf/export.sh\n"
|
||||||
cat $current_dir/add-to-export-sh.txt >> ~/esp/esp-idf/export.sh
|
cat ./add-to-export-sh.txt >> ~/esp/esp-idf/export.sh
|
||||||
|
|
||||||
echo 'Restart shell with `source ~/.zshrc` and run `get_idf` to use\n'
|
echo '\nRestart shell with `source ~/.zshrc` and run `get_idf` to use\n'
|
||||||
echo "All done :3 Enjoy your new esp-idf install and environment"
|
echo "\nEnjoy your new esp-idf install and environment\n"
|
||||||
|
echo "\nAll done :3\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user