This commit is contained in:
2024-12-28 05:50:52 -07:00
5 changed files with 40 additions and 57 deletions
+1 -2
View File
@@ -1,6 +1,5 @@
notes.txt
scratch.txt scratch.txt
*.bak *.bak
next-* *.old
old old
.vscode .vscode
+3 -1
View File
@@ -4,7 +4,9 @@ pulls from master so its the very latest
built for debian-like systems built for debian-like systems
only currently tested on zsh only currently tested on zsh
some features require user to have passwordless sudo rights some features require user to have passwordless sudo rights
Literally the most schizophrenically overengineered thing I have ever made. idk why I did that
## Quick start ## Quick start
`git clone https://github.com/PrincessPi3/esp-install-custom.git ~` `git clone https://github.com/PrincessPi3/esp-install-custom.git ~`
Regular → Executable
+17 -2
View File
@@ -1,5 +1,5 @@
#!/bin/bash #!/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 startTime=$(date '+%s') # to time the (re)install time for the logs
gitBranch=master # branch from github gitBranch=master # branch from github
@@ -19,7 +19,7 @@ else
fi fi
log=$installDir/install.log # log file 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 idfDir=$installDir/esp-idf # esp-idf path
espressifLocation=$HOME/.espressif # espressif tools install location espressifLocation=$HOME/.espressif # espressif tools install location
customBinLocation=$installDir/.custom_bin # where custom bin scripts are placed customBinLocation=$installDir/.custom_bin # where custom bin scripts are placed
@@ -83,6 +83,7 @@ rmExportBackupChk=0
# set sleepMins int variable # set sleepMins int variable
# redefine any other vars needed # redefine any other vars needed
# handleStart # handleStart
# handleClearInstallLog
# handleLogoutAllUsers # handleLogoutAllUsers
# handleSetupEnvironment # handleSetupEnvironment
# handleCustomBins # handleCustomBins
@@ -461,6 +462,15 @@ function handleChk() {
fi 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() { function handleEnd() {
handleChk handleChk
@@ -575,6 +585,7 @@ elif [[ "$arg" == "cron" || "$arg" == "c" ]]; then # full install with warn, sle
sleepMins=0 sleepMins=0
handleStart handleStart
handleClearInstallLog
handleLogoutAllUsers handleLogoutAllUsers
handleSetupEnvironment handleSetupEnvironment
handleCustomBins handleCustomBins
@@ -595,7 +606,10 @@ elif [[ "$arg" == "nuke" || "$arg" == "n" ]]; then # clear logs
action="REINSTALL (NUKE)" action="REINSTALL (NUKE)"
idfGet="download" idfGet="download"
handleStart handleStart
handleClearInstallLog
handleSetupEnvironment handleSetupEnvironment
handleCustomBins handleCustomBins
handleDownloadInstall handleDownloadInstall
@@ -617,6 +631,7 @@ else # full noninteractive (re)install without logout, reboot, or sleeps
action="REINSTALL (DEFAULT)" action="REINSTALL (DEFAULT)"
handleStart handleStart
handleClearInstallLog
handleSetupEnvironment handleSetupEnvironment
handleCustomBins handleCustomBins
handleDownloadInstall handleDownloadInstall
Regular → Executable
View File
+19 -52
View File
@@ -1,55 +1,22 @@
x maybe add retool to combined script? test:
x add esp install paths and such to envvars in ~/.zshrc bash reinstall-esp-idf.sh help
x functionize retool some bash reinstall-esp-idf.sh --help
x custom_bin bash reinstall-esp-idf.sh -h
x export bash reinstall-esp-idf.sh h
x prolly refactor some lmfao bash reinstall-esp-idf.sh test
x test --single-branch vs non bash reinstall-esp-idf.sh t
x redo comments bash reinstall-esp-idf.sh retool
x handleLogoutAllUsers log users test bash reinstall-esp-idf.sh rt
x handleWarnAllUsers log users test bash reinstall-esp-idf.sh
x interactive mode bash reinstall-esp-idf.sh clearlogs
x check end time loggan bash reinstall-esp-idf.sh clear
x clean up writeToLog to avoid repeated date() bash reinstall-esp-idf.sh clean
x export updoots bash reinstall-esp-idf.sh cl
x install applications, use which? bash reinstall-esp-idf.sh interactive
x test missing packages bash reinstall-esp-idf.sh i
x update repos instead of re-downoadan? bash reinstall-esp-idf.sh nuke
x test --single-branch bash reinstall-esp-idf.sh n
x time download and install bash reinstall-esp-idf.sh uninstall
x use return codes to define if install likely completed successfully
x upon success, touch some file to show success
x when script starts, delete the touched files
x touch up add-to-export-sh.txt
x alias add and document too
x maybe just cat a txt lmao
x test reinstall from zero
x fix dat nuke issue on line ~307 # fixed?
x standardize the capatilization and format and content of notes
x bug: duplicate export added to export.sh
x involves testExport prolly lol
x issue be in retool
x remove the log writes at entry functions
testan:
x bash reinstall-esp-idf.sh help
x bash reinstall-esp-idf.sh --help
x bash reinstall-esp-idf.sh -h
x bash reinstall-esp-idf.sh h
x bash reinstall-esp-idf.sh test
x bash reinstall-esp-idf.sh t
x bash reinstall-esp-idf.sh retool
x bash reinstall-esp-idf.sh rt
x bash reinstall-esp-idf.sh
x bash reinstall-esp-idf.sh clearlogs
x bash reinstall-esp-idf.sh clear
x bash reinstall-esp-idf.sh clean
x bash reinstall-esp-idf.sh cl
x bash reinstall-esp-idf.sh interactive
x bash reinstall-esp-idf.sh i
x bash reinstall-esp-idf.sh nuke
x bash reinstall-esp-idf.sh n
x bash reinstall-esp-idf.sh uninstall
bash reinstall-esp-idf.sh cron bash reinstall-esp-idf.sh cron
bash reinstall-esp-idf.sh c bash reinstall-esp-idf.sh c