diff --git a/reinstall-esp-idf.sh b/reinstall-esp-idf.sh index c1b2a0e..a4efe56 100644 --- a/reinstall-esp-idf.sh +++ b/reinstall-esp-idf.sh @@ -168,8 +168,8 @@ function handleSetupEnvironment() { writeToLog "$installDir exisits, skiping creation" fi - if [ -d "$espressifLocation" -a "$idfGet" == "update" ]; then - writeToLog "Skipping delete of $espressifLocation" + if [[ -d "$espressifLocation" && "$idfGet" == "update" ]]; then + writeToLog "Skipping delete of $espressifLocation because dir exists AND idfGet is set to update" else if [ -d "$espressifLocation" ]; then writeToLog "deleting $espressifLocation" @@ -202,7 +202,7 @@ function handleAliasEnviron() { function handleDownloadInstall() { writeToLog "Handling download and install (function ran)" - if [ "$idfGet" == "download" -o ! -d "$idfDir" ]; then + if [[ "$idfGet" == "download" || ! -d "$idfDir" ]]; then if [ -d "$idfDir" ]; then writeToLog "deleting $idfDir" rm -rf $idfDir diff --git a/version.txt b/version.txt index 1e24aa8..a47b672 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -61-dev1.6 \ No newline at end of file +61-dev1.7 \ No newline at end of file