From e52cac72a08e2b9c0396c4037004d2a1fb3afc5d Mon Sep 17 00:00:00 2001 From: hPrnicessPi3 Date: Sat, 10 May 2025 17:26:01 -0600 Subject: [PATCH] new shit or whatever idgaf make me --- CHANGELOG.txt | 7 ++++++- custom_bin/fullclean | 6 ++---- custom_bin/patch-esp-idf | 6 ++++++ esp-idf-tools-cmd.sh | 31 ++++++++++++++++++++++++++++--- version.txt | 2 +- 5 files changed, 43 insertions(+), 9 deletions(-) create mode 100644 custom_bin/patch-esp-idf diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2ed2e9c..e848170 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -35,4 +35,9 @@ fixed cron bug 1.0-release-r2 - fixed fullclean bug \ No newline at end of file + fixed fullclean bug + +1.1-dev-1 + added downloads and updates of espressif's esp-dev-kits repo (https://github.com/espressif/esp-dev-kits) + patch-esp-idf added + a shortcut for applying esp-idf patches \ No newline at end of file diff --git a/custom_bin/fullclean b/custom_bin/fullclean index 751cc9f..f631f08 100644 --- a/custom_bin/fullclean +++ b/custom_bin/fullclean @@ -3,8 +3,6 @@ echo -e "\nCleaning up Fully\n" echo -e "\nRunning fullclean\n" -idf.py fullclean - if [ -d build ]; then echo -e "\nDeleting build dir\n" rm -rf build @@ -35,6 +33,6 @@ if [ -f dependencies.lock ]; then rm -f dependencies.lock fi -echo -e "\nAll done :3\n" +idf.py fullclean -dependencies \ No newline at end of file +echo -e "\nAll done :3\n" \ No newline at end of file diff --git a/custom_bin/patch-esp-idf b/custom_bin/patch-esp-idf new file mode 100644 index 0000000..8964934 --- /dev/null +++ b/custom_bin/patch-esp-idf @@ -0,0 +1,6 @@ +#!/bin/bash +set -e +echo -e "\napplyan a patch~ $1 to $ESPIDFTOOLS_INSTALLDIR/esp-idf\n" +cp "$1" "$ESPIDFTOOLS_INSTALLDIR/esp-idf" +git -C "$ESPIDFTOOLS_INSTALLDIR/esp-idf" apply "$1" +echo -e "\nall donseies~\n" \ No newline at end of file diff --git a/esp-idf-tools-cmd.sh b/esp-idf-tools-cmd.sh index 83b95aa..773d9ca 100644 --- a/esp-idf-tools-cmd.sh +++ b/esp-idf-tools-cmd.sh @@ -88,6 +88,8 @@ else fi gitUpdateCmd="git -C $idfDir reset --hard; git -C $idfDir clean -df; git -C $idfDir pull $idfDir" # mayhapsnasst? +gitDevKits="git clone --recursive https://github.com/espressif/esp-dev-kits.git $installDir/esp-dev-kits" +gitDevKitsUpdate="git -C $installDir/esp-dev-kits reset --hard; git -C $installDir/esp-dev-kits clean -df; git -C $installDir/esp-dev-kits pull" installCmd="$idfDir/install.sh all" toolsInstallCmd="python $idfDir/tools/idf_tools.py install all" idfGet="update" # default method @@ -294,6 +296,8 @@ function handleSetupEnvironment() { writeToLog "$espressifLocation not found, skipping delete for reinstall\n" fi fi + + } function testAppendAlias() { @@ -333,22 +337,43 @@ function handleDownloadInstall() { writeToLog "$idfDir not found, skipping delete\n" fi + if [ -d "$installDir/esp-dev-kits" ]; then + writeToLog "$installDir/esp-dev-kits found, deleting for reinstall\n" + rm -rf "$installDir/esp-dev-kits" + returnStatus + else + writeToLog "$installDir/esp-dev-kits not found, skipping delete for reinstall\n" + fi + istartTime=$(date '+%s') writeToLog "CLONING esp-idf, branch $gitBranch with $gitJobs jobs to $idfDir\n\tCommand: $gitCloneCmd" + eval "$gitCloneCmd" returnStatus gitChk=$? + + writeToLog "CLONING esp-dev-kits\n\tCommand: '$gitDevKits'" + eval "$gitDevKits" + returnStatus + gitChk=$? + iendTime=$(date '+%s') installerTime=$(($iendTime-$istartTime)) writeToLog "Git CLONE completed in $installerTime seconds from branch $gitBranch\n" else + istartTime=$(date '+%s') writeToLog "Setting for update mode\n" - istartTime=$(date '+%s') writeToLog "UPDATING esp-idf, branch $gitBranch with $gitJobs jobs to $idfDir\n\tCommand: $gitUpdateCmd" eval "$gitUpdateCmd" returnStatus gitChk=$? + + writeToLog "UPDATING esp-dev-kits\n\tCommand: '$gitDevKitsUpdate'" + eval "$gitDevKitsUpdate" + returnStatus + gitChk=$? + iendTime=$(date '+%s') installerTime=$(($iendTime-$istartTime)) writeToLog "Git UPDATE completed in $installerTime seconds from Branch $gitBranch\n" @@ -628,9 +653,9 @@ elif [[ "$arg" == "nuke" || "$arg" == "n" ]]; then exit -elif [[ "$arg" == "nukereboot" || "$arg" == "nr" ]]; then +elif [[ "$arg" == "nukereboot" || "$arg" == "nr" || "$arg" == "rebootnuke" || "$arg" == "rn" ]]; then action="REINSTALL (NUKEREBOOT)" - sleepMins=0 # restart right away + sleepMins=1 idfGet="download" handleStart diff --git a/version.txt b/version.txt index 952c81e..f3da856 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0-release-r2 \ No newline at end of file +1.1-dev-1 \ No newline at end of file