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
*.bak
next-*
*.old
old
.vscode
+3 -1
View File
@@ -4,7 +4,9 @@ pulls from master so its the very latest
built for debian-like systems
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
`git clone https://github.com/PrincessPi3/esp-install-custom.git ~`
Regular → Executable
+17 -2
View File
@@ -1,5 +1,5 @@
#!/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
gitBranch=master # branch from github
@@ -19,7 +19,7 @@ else
fi
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
espressifLocation=$HOME/.espressif # espressif tools install location
customBinLocation=$installDir/.custom_bin # where custom bin scripts are placed
@@ -83,6 +83,7 @@ rmExportBackupChk=0
# set sleepMins int variable
# redefine any other vars needed
# handleStart
# handleClearInstallLog
# handleLogoutAllUsers
# handleSetupEnvironment
# handleCustomBins
@@ -461,6 +462,15 @@ function handleChk() {
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() {
handleChk
@@ -575,6 +585,7 @@ elif [[ "$arg" == "cron" || "$arg" == "c" ]]; then # full install with warn, sle
sleepMins=0
handleStart
handleClearInstallLog
handleLogoutAllUsers
handleSetupEnvironment
handleCustomBins
@@ -595,7 +606,10 @@ elif [[ "$arg" == "nuke" || "$arg" == "n" ]]; then # clear logs
action="REINSTALL (NUKE)"
idfGet="download"
handleStart
handleClearInstallLog
handleSetupEnvironment
handleCustomBins
handleDownloadInstall
@@ -617,6 +631,7 @@ else # full noninteractive (re)install without logout, reboot, or sleeps
action="REINSTALL (DEFAULT)"
handleStart
handleClearInstallLog
handleSetupEnvironment
handleCustomBins
handleDownloadInstall
Regular → Executable
View File
+19 -52
View File
@@ -1,55 +1,22 @@
x maybe add retool to combined script?
x add esp install paths and such to envvars in ~/.zshrc
x functionize retool some
x custom_bin
x export
x prolly refactor some lmfao
x test --single-branch vs non
x redo comments
x handleLogoutAllUsers log users test
x handleWarnAllUsers log users test
x interactive mode
x check end time loggan
x clean up writeToLog to avoid repeated date()
x export updoots
x install applications, use which?
x test missing packages
x update repos instead of re-downoadan?
x test --single-branch
x time download and install
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
test:
bash reinstall-esp-idf.sh help
bash reinstall-esp-idf.sh --help
bash reinstall-esp-idf.sh -h
bash reinstall-esp-idf.sh h
bash reinstall-esp-idf.sh test
bash reinstall-esp-idf.sh t
bash reinstall-esp-idf.sh retool
bash reinstall-esp-idf.sh rt
bash reinstall-esp-idf.sh
bash reinstall-esp-idf.sh clearlogs
bash reinstall-esp-idf.sh clear
bash reinstall-esp-idf.sh clean
bash reinstall-esp-idf.sh cl
bash reinstall-esp-idf.sh interactive
bash reinstall-esp-idf.sh i
bash reinstall-esp-idf.sh nuke
bash reinstall-esp-idf.sh n
bash reinstall-esp-idf.sh uninstall
bash reinstall-esp-idf.sh cron
bash reinstall-esp-idf.sh c