From 461960bb77822e4734fe53822d02ddc66334da3e Mon Sep 17 00:00:00 2001 From: hPrnicessPi3 Date: Sat, 10 May 2025 01:19:14 -0600 Subject: [PATCH] testiung for release 6 --- CHANGELOG.txt | 1 + README.md | 24 ++++++++++++------------ esp-idf-tools-cmd.sh | 6 ++++-- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 9305069..13f1e7a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -9,5 +9,6 @@ removed install branch command various bug fixes various error checking added + various stability improvements added bash shell support (experimental) full testing done \ No newline at end of file diff --git a/README.md b/README.md index 42e0ffe..6c81cac 100644 --- a/README.md +++ b/README.md @@ -18,52 +18,53 @@ Literally the most schizophrenically overengineered thing I have ever made. idk ``` Some take optional [branch] paramater [branch] is the esp-idf branch you desire, defaults to master if not specified. - default: + run-esp-cmd: reinstalls non-interactively with no delays, logouts, or reboots `run-esp-cmd` - test: + run-esp-cmd test: tests the script. very fast. minimal actions taken. no reinstall is done `run-esp-cmd test [branch]` `run-esp-cmd t [branch]` - retool: + run-esp-cmd retool: reinstalls bins and export.sh, nothing else `run-esp-cmd retool` `run-esp-cmd rt` - cron: + run-esp-cmd cron: runs noninteractively with forced user logout and automatic reboot, plus delays `run-esp-cmd cron [branch]` `run-esp-cmd c [branch]` - update: + run-esp-cmd update: updates and installs latest without reboot or user logout `run-esp-cmd update [branch]` `run-esp-cmd u [branch]` - interactive: + run-esp-cmd interactive: interactively installs/reinstalls esp-idf `run-esp-cmd interactive` `run-esp-cmd i` + `run-esp-cmd install` - nuke: + run-esp-cmd nuke: full delete and re-download and install `run-esp-cmd nuke [branch]` `run-esp-cmd n [branch]` - nukereboot + run-esp-cmd nukereboot full delete and re-download and install, then reboot `run-esp-cmd nukereboot [branch]` `run-esp-cmd nr [branch]` - clearlogs: + run-esp-cmd clearlogs: clear logs `run-esp-cmd clearlogs` `run-esp-cmd clear` `run-esp-cmd cl` - help: + run-esp-cmd help: display this help text `run-esp-cmd help` `run-esp-cmd h` @@ -71,7 +72,7 @@ Some take optional [branch] paramater `run-esp-cmd --help` `help-esp-tools` - uninstall: + run-esp-cmd uninstall: uninstall esp-idf `run-esp-cmd uninstall` ``` @@ -114,7 +115,6 @@ Some take optional [branch] paramater * ex. cd `$examples` ### Cronjob - reinstall from master everyday at 4am, logging out users with warn delays and rebooting after * `crontab -e` add below to bottom of file: diff --git a/esp-idf-tools-cmd.sh b/esp-idf-tools-cmd.sh index 2cbd1bf..c36a6f2 100644 --- a/esp-idf-tools-cmd.sh +++ b/esp-idf-tools-cmd.sh @@ -119,6 +119,8 @@ cpCustomBinChk=0 rmCustomBinChk=0 sleepChk=0 rmExportBackupChk=0 +helpExecChk=0 +versionExecChk=0 function returnStatus() { ret=$? @@ -212,7 +214,7 @@ function handleCustomBins() { cp "$runningDir/version.txt" "$customBinLocation" returnStatus - versuibExecChk=$? + versionExecChk=$? } @@ -447,7 +449,7 @@ function handleUninstall() { } function handleChk() { - retCodes="Error Checking:\n\tPackages install: $pkgInstallChk\n\tGit pull/clone: $gitChk\n\tInstall script: $installChk\n\tInstall tools: $toolsInstallChk\n\tExport append: $exportCatChk\n\tExport edit return: $exportSedReturnChk\n\tExport version: $exportSedVersionChk\n\tExport date: $exportSedDateChk\n\tExport git hash: $exportSedHashChk\n\trun-esp-reinstall alias: $aliasRunEspReinstallChk\n\tesp-monitor alias: $aliasEspMonitorchk\n\tesp-logs alias: $aliasEspLogsChk\n\tESPIDFTOOLS_INSTALLDIR envvar: $installDir\n\tWarned Users: $warnChk\n\tLogged out users: $logoutChk\n\tAppended git log to version-data.txt: $gitLogChk\n\tAcquired git hash: $gitHashChk\n\tDeleted esp-idf dir: $rmIdfDirChk\n\tDeleted .espressif dir: $rmEspressifChk\n\tCreated install dir: $mkInstallDirChk\n\tRestored export.sh.bak: $restoreExportScriptChk\n\tDeleted old export.sh: $rmExportScriptCh\n\tBacked up export.sh to export.sh.bak: $backupExportScriptChk\n\tDeleted backup export export.bak.sh: $rmExportBackupChk\n\tMade custom scripts executable: $customBinExecChk\n\tCopied custom scripts: $cpCustomBinChk\n\tDeleted old custom scripts dir: $rmCustomBinChk\n\tWoke from sleep: $sleepChk" + retCodes="Error Checking:\n\tPackages install: $pkgInstallChk\n\tGit pull/clone: $gitChk\n\tInstall script: $installChk\n\tInstall tools: $toolsInstallChk\n\tExport append: $exportCatChk\n\tExport edit return: $exportSedReturnChk\n\tExport version: $exportSedVersionChk\n\tExport date: $exportSedDateChk\n\tExport git hash: $exportSedHashChk\n\trun-esp-reinstall alias: $aliasRunEspReinstallChk\n\tesp-monitor alias: $aliasEspMonitorchk\n\tesp-logs alias: $aliasEspLogsChk\n\tESPIDFTOOLS_INSTALLDIR envvar: $installDir\n\tWarned Users: $warnChk\n\tLogged out users: $logoutChk\n\tAppended git log to version-data.txt: $gitLogChk\n\tAcquired git hash: $gitHashChk\n\tDeleted esp-idf dir: $rmIdfDirChk\n\tDeleted .espressif dir: $rmEspressifChk\n\tCreated install dir: $mkInstallDirChk\n\tRestored export.sh.bak: $restoreExportScriptChk\n\tDeleted old export.sh: $rmExportScriptCh\n\tBacked up export.sh to export.sh.bak: $backupExportScriptChk\n\tDeleted backup export export.bak.sh: $rmExportBackupChk\n\tMade custom scripts executable: $customBinExecChk\n\tCopied custom scripts: $cpCustomBinChk\n\tDeleted old custom scripts dir: $rmCustomBinChk\n\tWoke from sleep: $sleepChk\n\tHelp text copied: $helpExecChk\n\tversion text copied: $versionExecChk" totalErrorLoad=$(($pkgInstallChk+$gitChk+$gitChk+$installChk+$toolsInstallChk+$exportSedHashChk+$exportCatChk+$exportSedReturnChk+$aliasRunEspReinstallChk+$aliasEspMonitorchk+$aliasEspLogsChk+$aliasInstallDirChk+$warnChk+$logoutChk+$gitLogChk+$gitHashChk+$rmIdfDirChk+$rmEspressifChk+$mkInstallDirChk+$restoreExportScriptChk+$rmExportScriptChk+$backupExportScriptChk+$customBinExecChk+$rmCustomBinChk+$sleepChk+$rmExportBackupChk))