60-beta2.3

This commit is contained in:
2024-11-12 09:57:04 -07:00
parent 3464f94a3c
commit 81f4e89a8b
4 changed files with 27 additions and 21 deletions
+5 -1
View File
@@ -30,7 +30,7 @@ only currently tested on zsh
```
Modes:
default:
reinstalls non-interactively with no delays, logouts, or reboots
reinstalls non-interactively with no delays, logouts, or reboots. run without any argument
bash reinstall-esp-idf.sh
test:
@@ -49,6 +49,10 @@ Modes:
interactively installs/reinstalls esp-idf
bash reinstall-esp-idf.sh interactive
clearlogs:
clear logs
bash reinstall-esp-idf.sh clearlogs
help:
display this help text
bash reinstall-esp-idf.sh help
+4
View File
@@ -19,6 +19,10 @@ Modes:
interactively installs/reinstalls esp-idf
`bash reinstall-esp-idf.sh interactive`
clearlogs:
clear logs
`bash reinstall-esp-idf.sh clearlogs`
help:
display this help text
`bash reinstall-esp-idf.sh help`
+16 -18
View File
@@ -23,6 +23,13 @@ helpText=$runningDir/help.txt
scriptVers=$(cat $runningDir/version.txt) # make sure version.txt does NOT have newline
arg=$1 # just rename the argument var for clarity with the functions
# commands
gitCmd="git clone --jobs $gitJobs --branch $gitBranch --single-branch https://github.com/espressif/esp-idf $idfDir"
installCmd="$idfDir/install.sh all"
toolsInstallCmd="python $idfDir/tools/idf_tools.py install all"
# full order:
# handleStart
# handleLogoutAllUsers
@@ -189,6 +196,8 @@ handleWarnAllUsers() {
loggedIn=$(who | awk '{print $1}' | uniq)
writeToLog "$(date '+%d/%m/%Y %H:%M:%S %Z (%s)'): Warning all logged in users:\n$lggedIn" # make sure dis workan
echo $loggedIn | while read line; do
echo -e "$warningString" | sudo write
done
@@ -202,6 +211,8 @@ function handleLogoutAllUsers() {
loggedIn=$(who | awk '{print $1}' | uniq)
writeToLog "$(date '+%d/%m/%Y %H:%M:%S %Z (%s)'): logging out all logged in users:\n$lggedIn" # make sure dis workan
echo $loggedIn | while read line; do
sudo loginctl terminate-user $line
done
@@ -315,12 +326,6 @@ elif [ "$arg" == "interactive" ]; then
writeToLog "$(date '+%d/%m/%Y %H:%M:%S %Z (%s)'): Interactive vars set:\n\tinstallDir: $installDir\n\tgitBranch: $gitBranch\n\trcFile: $rcFile\n\tgitJobs: $gitJobs"
gitCmd="git clone --jobs $gitJobs --branch $gitBranch --single-branch https://github.com/espressif/esp-idf $idfDir"
installCmd="$idfDir/install.sh all"
toolsInstallCmd="python $idfDir/tools/idf_tools.py install all"
handleStart
handleSetupEnvironment
handleCustomBins
@@ -334,12 +339,6 @@ elif [ "$arg" == "interactive" ]; then
elif [ "$arg" == "cron" ]; then # full install with warn, sleep, and reboot
action="REINSTALL (CRON)"
gitCmd="git clone --jobs $gitJobs --branch $gitBranch --single-branch https://github.com/espressif/esp-idf $idfDir"
installCmd="$idfDir/install.sh all"
toolsInstallCmd="python $idfDir/tools/idf_tools.py install all"
handleStart
handleLogoutAllUsers
handleSetupEnvironment
@@ -352,15 +351,14 @@ elif [ "$arg" == "cron" ]; then # full install with warn, sleep, and reboot
exit
elif [ "$arg" == "clearlogs" ]; then # clear logs
handleEmptyLogs
exit
else # full noninteractive (re)install without logout, reboot, or sleeps
action="REINSTALL (DEFAULT)"
gitCmd="git clone --jobs $gitJobs --branch $gitBranch --single-branch https://github.com/espressif/esp-idf $idfDir"
installCmd="$idfDir/install.sh all"
toolsInstallCmd="python $idfDir/tools/idf_tools.py install all"
handleStart
handleSetupEnvironment
handleCustomBins
+1 -1
View File
@@ -1 +1 @@
60-beta2.1
60-beta2.3