This commit is contained in:
2024-11-13 07:46:46 -07:00
parent f900b2d8f8
commit c51cf30f59
3 changed files with 15 additions and 14 deletions
+13 -12
View File
@@ -7,6 +7,7 @@ rcFile=$HOME/.zshrc # shell rc file
gitJobs=5 # number of jobs to download from github with gitJobs=5 # number of jobs to download from github with
# get us our FUCKING ALIASES HOLY FUCK GOD DAMN SHIT FUCK IT # get us our FUCKING ALIASES HOLY FUCK GOD DAMN SHIT FUCK IT
# 2?/dev/null is to redirect any errors
source $rcFile 2>/dev/null source $rcFile 2>/dev/null
# echo -e "\n\nSource $rcFile\n\t retval: $?\n\n" # echo -e "\n\nSource $rcFile\n\t retval: $?\n\n"
@@ -106,7 +107,7 @@ function handleSleep() {
sleepSecs=$(($sleepMins*60)) # calculated seconds of warning to wait for user to log out sleepSecs=$(($sleepMins*60)) # calculated seconds of warning to wait for user to log out
writeToLog "sleeping ${sleepMins} minutes" writeToLog "sleeping $sleepMins minutes"
sleep $sleepSecs sleep $sleepSecs
returnStatus returnStatus
sleepChk=$? sleepChk=$?
@@ -141,20 +142,20 @@ function handleCustomBins() {
writeToLog "Handling custon bins (function ran)\n" writeToLog "Handling custon bins (function ran)\n"
if [ -d $customBinLocation ]; then if [ -d $customBinLocation ]; then
writeToLog "deleting ${customBinLocation}" writeToLog "deleting $customBinLocation"
rm -rf $customBinLocation rm -rf $customBinLocation
returnStatus returnStatus
rmCustomBinChk=$? rmCustomBinChk=$?
else else
writeToLog "${customBinLocation} not found, skipping delete\n" writeToLog "$customBinLocation not found, skipping delete\n"
fi fi
writeToLog "copying scripts from ${customBinFrom} to ${customBinLocation}" writeToLog "copying scripts from $customBinFrom to $customBinLocation"
cp -r $customBinFrom $customBinLocation cp -r $customBinFrom $customBinLocation
returnStatus returnStatus
cpCustomBinChk=$? cpCustomBinChk=$?
writeToLog "making scripts executable at ${customBinLocation}" writeToLog "making scripts executable at $customBinLocation"
chmod -R +x $customBinLocation chmod -R +x $customBinLocation
returnStatus returnStatus
customBinExecChk=$? customBinExecChk=$?
@@ -264,8 +265,8 @@ function handleAliasEnviron() {
testAppendAlias "esp_logs" "alias esp_logs='less $installDir/install.log; less $installDir/version-data.txt'" testAppendAlias "esp_logs" "alias esp_logs='less $installDir/install.log; less $installDir/version-data.txt'"
if [ -z $ESPIDF_INSTALLDIR ]; then if [ -z $ESPIDF_INSTALLDIR ]; then
writeToLog "ESPIDF_INSTALLDIR environment variable not found, appending to ${rcFile}" writeToLog "ESPIDF_INSTALLDIR environment variable not found, appending to $rcFile"
echo -e "export ESPIDF_INSTALLDIR=\"${installDir}\"\n" >> $rcFile echo -e "export ESPIDF_INSTALLDIR=\"$installDir\"\n" >> $rcFile
returnStatus returnStatus
aliasInstallDirChk=$? aliasInstallDirChk=$?
else else
@@ -350,7 +351,7 @@ handleReboot() {
handleWarnAllUsers() { handleWarnAllUsers() {
writeToLog "Warning all users of impending logout (function called)\n" writeToLog "Warning all users of impending logout (function called)\n"
warningString="\nWARNING:\n\tReinstalling esp-idf:\n\tForce logut in ${sleepMins} minutes!!\n\tSave and log out!\n\tmonitor with \`tail -f -n 50 $HOME/esp/install.log\`\n\tterminate with \`sudo killall reinstall-esp-idf.sh\`\n" warningString="\nWARNING:\n\tReinstalling esp-idf:\n\tForce logut in $sleepMins minutes!!\n\tSave and log out!\n\tmonitor with \`tail -f -n 50 $HOME/esp/install.log\`\n\tterminate with \`sudo killall reinstall-esp-idf.sh\`\n"
writeToLog "$warningString" writeToLog "$warningString"
@@ -417,8 +418,8 @@ function handleStart() {
fi fi
if [ "$arg" != "interactive" -a "$arg" != "i" ]; then if [ "$arg" != "interactive" -a "$arg" != "i" ]; then
writeToLog " === NEW ${action} ===" writeToLog " === NEW $action ==="
writeToLog "\tVersion: ${scriptVers}\n" writeToLog "\tVersion: $scriptVers\n"
fi fi
# run environment sanity checks # run environment sanity checks
@@ -552,8 +553,8 @@ elif [[ "$arg" == "interactive" || "$arg" == "i" ]]; then
idfGet=$readIdfGet idfGet=$readIdfGet
fi fi
writeToLog "\n === new ${action} ===\n" writeToLog "\n === new $action ===\n"
writeToLog "\tVersion: ${scriptVers}\n" writeToLog "\tVersion: $scriptVers\n"
writeToLog "Interactive vars set:\n\tinstallDir: $installDir\n\tgitBranch: $gitBranch\n\trcFile: $rcFile\n\tgitJobs: $gitJobs\n\tidfGet: $idfGet\n" writeToLog "Interactive vars set:\n\tinstallDir: $installDir\n\tgitBranch: $gitBranch\n\trcFile: $rcFile\n\tgitJobs: $gitJobs\n\tidfGet: $idfGet\n"
+1 -1
View File
@@ -42,7 +42,7 @@ testan:
x bash reinstall-esp-idf.sh i x bash reinstall-esp-idf.sh i
x bash reinstall-esp-idf.sh nuke x bash reinstall-esp-idf.sh nuke
x bash reinstall-esp-idf.sh n x bash reinstall-esp-idf.sh n
bash reinstall-esp-idf.sh cron x bash reinstall-esp-idf.sh cron
bash reinstall-esp-idf.sh c bash reinstall-esp-idf.sh c
mayhaps support bash? mayhaps support bash?
+1 -1
View File
@@ -1 +1 @@
61-rc2.2 61-rc2.3