diff --git a/reinstall-esp-idf.sh b/reinstall-esp-idf.sh index 267b91e..1b2741c 100755 --- a/reinstall-esp-idf.sh +++ b/reinstall-esp-idf.sh @@ -1,5 +1,5 @@ #!/bin/bash -# set -e # for testan, die on eelrror +# set -e # uncomment for die on error startTime=$(date '+%s') # to time the (re)install time for the logs gitBranch=master # branch from github @@ -19,7 +19,7 @@ else fi log=$installDir/install.log # log file -versionData=$installDir/version-data.txt # version data log file +versionData=$installDir/version-data.log # version data log file idfDir=$installDir/esp-idf # esp-idf path espressifLocation=$HOME/.espressif # espressif tools install location customBinLocation=$installDir/.custom_bin # where custom bin scripts are placed @@ -83,6 +83,7 @@ rmExportBackupChk=0 # set sleepMins int variable # redefine any other vars needed # handleStart +# handleClearInstallLog # handleLogoutAllUsers # handleSetupEnvironment # handleCustomBins @@ -460,6 +461,15 @@ function handleChk() { fi } +function handleClearInstallLog() { + if [ -f "$log" ]; then + echo -e "\nClearing install.log\n" + rm "$log" + else + echo "\n$log Not Found, Skipping Delete\n" + fi +} + function handleEnd() { handleChk @@ -574,6 +584,7 @@ elif [[ "$arg" == "cron" || "$arg" == "c" ]]; then # full install with warn, sle sleepMins=0 handleStart + handleClearInstallLog handleLogoutAllUsers handleSetupEnvironment handleCustomBins @@ -594,7 +605,10 @@ elif [[ "$arg" == "nuke" || "$arg" == "n" ]]; then # clear logs action="REINSTALL (NUKE)" idfGet="download" + + handleStart + handleClearInstallLog handleSetupEnvironment handleCustomBins handleDownloadInstall @@ -616,6 +630,7 @@ else # full noninteractive (re)install without logout, reboot, or sleeps action="REINSTALL (DEFAULT)" handleStart + handleClearInstallLog handleSetupEnvironment handleCustomBins handleDownloadInstall diff --git a/version.txt b/version.txt index 7fd06f8..aee4b7f 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -6.1-dev \ No newline at end of file +6.2-dev \ No newline at end of file