From ccf8cce6358c37ef7afb3f7afabfeab9d4353bcf Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Tue, 12 Nov 2024 17:04:08 -0700 Subject: [PATCH] 61-dev1.5 --- reinstall-esp-idf.sh | 16 ++++++++++------ version.txt | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/reinstall-esp-idf.sh b/reinstall-esp-idf.sh index 569c915..91086f4 100644 --- a/reinstall-esp-idf.sh +++ b/reinstall-esp-idf.sh @@ -160,7 +160,7 @@ function handleExport() { function handleSetupEnvironment() { writeToLog "Handling setup environment (function ran)" - if ! [ -d $installDir ]; then + if [ ! -d "$installDir" ]; then writeToLog "creating $installDir" mkdir $installDir returnStatus @@ -168,12 +168,16 @@ function handleSetupEnvironment() { writeToLog "$installDir exisits, skiping creation" fi - if [ -d $espressifLocation ]; then - writeToLog "deleting $espressifLocation" - rm -rf $espressifLocation - returnStatus + if [ -d "$espressifLocation" -a "$idfGet" == "update" ]; then + writeToLog "Skipping delete of $espressifLocation" else - writeToLog "$espressifLocation not found, skipping delete" + if [ -d "$espressifLocation" ]; then + writeToLog "deleting $espressifLocation" + rm -rf $espressifLocation + returnStatus + else + writeToLog "Skipping delete of $espressifLocation" + fi fi } diff --git a/version.txt b/version.txt index 48db36f..160180e 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -61-dev1.4 \ No newline at end of file +61-dev1.5 \ No newline at end of file