From 6a1c8913da70aed7aba77ee9cf3188e6e91f9f8b Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Tue, 12 Nov 2024 06:57:15 -0700 Subject: [PATCH] qwrg --- cron-reinstall-esp-idf.sh | 14 +++++++++++--- version.txt | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cron-reinstall-esp-idf.sh b/cron-reinstall-esp-idf.sh index bf119e3..7cdb29c 100644 --- a/cron-reinstall-esp-idf.sh +++ b/cron-reinstall-esp-idf.sh @@ -27,6 +27,7 @@ runningDir="$( cd "$( dirname "$0" )" && pwd )" customBinFrom=$runningDir/custom_bin # cronVers=55-dev.3 # version of this script scriptVers=$(cat $runningDir/version.txt) # make sure version.txt does NOT have newline + arg=$1 function returnStatus() { @@ -41,7 +42,9 @@ function writeToLog() { } function sleepHold() { - sleepSecs=$((sleepMins*60)) # calculated seconds of warning to wait for user to log out + writeToLog "$(date '+%d/%m/%Y %H:%M:%S %Z (%s)'): Handling sleep hold (function ran)" + + sleepSecs=$(($sleepMins*60)) # calculated seconds of warning to wait for user to log out writeToLog "$(date '+%d/%m/%Y %H:%M:%S %Z (%s)'): sleeping ${sleepMins} minutes" sleep $sleepSecs @@ -200,8 +203,7 @@ function handleEnd() { # handleCustomBins # handleDownloadInstall # handleExport -# handleWarn -# sleepHold +# handleLogoutAllUsers # handleEnd # handleReboot # exit @@ -236,6 +238,8 @@ elif [ "$arg" == "nologout" ]; then toolsInstallCmd="python $idfDir/tools/idf_tools.py install all" + sleepMins=0 + handleStart handleSetupEnvironment handleCustomBins @@ -247,6 +251,8 @@ elif [ "$arg" == "nologout" ]; then elif [ "$arg" == "retool" ]; then action="RETOOL" + sleepMins=0 + handleStart handleCustomBins handleExport @@ -262,6 +268,8 @@ else # full install with warn, sleep, and reboot toolsInstallCmd="python $idfDir/tools/idf_tools.py install all" + sleepMins=0 + handleStart handleLogoutAllUsers handleSetupEnvironment diff --git a/version.txt b/version.txt index dc1e402..e4b25ef 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -60-dev.1 \ No newline at end of file +60-dev.2 \ No newline at end of file