60-beta2.3
This commit is contained in:
@@ -30,7 +30,7 @@ only currently tested on zsh
|
|||||||
```
|
```
|
||||||
Modes:
|
Modes:
|
||||||
default:
|
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
|
bash reinstall-esp-idf.sh
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@@ -49,6 +49,10 @@ Modes:
|
|||||||
interactively installs/reinstalls esp-idf
|
interactively installs/reinstalls esp-idf
|
||||||
bash reinstall-esp-idf.sh interactive
|
bash reinstall-esp-idf.sh interactive
|
||||||
|
|
||||||
|
clearlogs:
|
||||||
|
clear logs
|
||||||
|
bash reinstall-esp-idf.sh clearlogs
|
||||||
|
|
||||||
help:
|
help:
|
||||||
display this help text
|
display this help text
|
||||||
bash reinstall-esp-idf.sh help
|
bash reinstall-esp-idf.sh help
|
||||||
|
|||||||
@@ -18,7 +18,11 @@ Modes:
|
|||||||
interactive:
|
interactive:
|
||||||
interactively installs/reinstalls esp-idf
|
interactively installs/reinstalls esp-idf
|
||||||
`bash reinstall-esp-idf.sh interactive`
|
`bash reinstall-esp-idf.sh interactive`
|
||||||
|
|
||||||
|
clearlogs:
|
||||||
|
clear logs
|
||||||
|
`bash reinstall-esp-idf.sh clearlogs`
|
||||||
|
|
||||||
help:
|
help:
|
||||||
display this help text
|
display this help text
|
||||||
`bash reinstall-esp-idf.sh help`
|
`bash reinstall-esp-idf.sh help`
|
||||||
|
|||||||
+16
-18
@@ -23,6 +23,13 @@ helpText=$runningDir/help.txt
|
|||||||
scriptVers=$(cat $runningDir/version.txt) # make sure version.txt does NOT have newline
|
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
|
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:
|
# full order:
|
||||||
# handleStart
|
# handleStart
|
||||||
# handleLogoutAllUsers
|
# handleLogoutAllUsers
|
||||||
@@ -189,6 +196,8 @@ handleWarnAllUsers() {
|
|||||||
|
|
||||||
loggedIn=$(who | awk '{print $1}' | uniq)
|
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 $loggedIn | while read line; do
|
||||||
echo -e "$warningString" | sudo write
|
echo -e "$warningString" | sudo write
|
||||||
done
|
done
|
||||||
@@ -202,6 +211,8 @@ function handleLogoutAllUsers() {
|
|||||||
|
|
||||||
loggedIn=$(who | awk '{print $1}' | uniq)
|
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
|
echo $loggedIn | while read line; do
|
||||||
sudo loginctl terminate-user $line
|
sudo loginctl terminate-user $line
|
||||||
done
|
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"
|
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
|
handleStart
|
||||||
handleSetupEnvironment
|
handleSetupEnvironment
|
||||||
handleCustomBins
|
handleCustomBins
|
||||||
@@ -333,12 +338,6 @@ elif [ "$arg" == "interactive" ]; then
|
|||||||
|
|
||||||
elif [ "$arg" == "cron" ]; then # full install with warn, sleep, and reboot
|
elif [ "$arg" == "cron" ]; then # full install with warn, sleep, and reboot
|
||||||
action="REINSTALL (CRON)"
|
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
|
handleStart
|
||||||
handleLogoutAllUsers
|
handleLogoutAllUsers
|
||||||
@@ -352,14 +351,13 @@ elif [ "$arg" == "cron" ]; then # full install with warn, sleep, and reboot
|
|||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
||||||
|
elif [ "$arg" == "clearlogs" ]; then # clear logs
|
||||||
|
handleEmptyLogs
|
||||||
|
|
||||||
|
exit
|
||||||
|
|
||||||
else # full noninteractive (re)install without logout, reboot, or sleeps
|
else # full noninteractive (re)install without logout, reboot, or sleeps
|
||||||
action="REINSTALL (DEFAULT)"
|
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
|
handleStart
|
||||||
handleSetupEnvironment
|
handleSetupEnvironment
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
60-beta2.1
|
60-beta2.3
|
||||||
Reference in New Issue
Block a user