testiung for release 2

This commit is contained in:
2025-05-09 23:47:13 -06:00
parent b47cbbc684
commit 6837d0ecc9
9 changed files with 84 additions and 74 deletions
+1
View File
@@ -6,3 +6,4 @@
9-rc-final
fixed and renamed ESPIDF_INSTALLDIR ESPIDFTOOLS_INSTALLDIR
removed install branch command
+6 -3
View File
@@ -19,14 +19,13 @@ commitHash=commitTAG
installDate=installDateTAG
branchData=branchDataTAG
if [ -z $ESPIDTOOLS_INSTALLDIR ]; then
if [ -z "$ESPIDTOOLS_INSTALLDIR" ]; then
echo -e "\nFAIL: ESPIDFTOOLS_INSTALLDIR environment variable not found!\nReinstall via script or manually add to ~/.zshrc\n"
exit
fi
binDir="$ESPIDFTOOLS_INSTALLDIR/.custom_bin"
echo -e "\nTTY devices found in dmesg:"
echo -e "\nChecking for Serial Devices in dmesg\n"
COUNTER=0
devarr=()
for line in $(dmesg | tail -50 | grep -o -E "tty[A-Z]{3}[0-9]{0,2}" | sort -u); do
@@ -35,9 +34,13 @@ for line in $(dmesg | tail -50 | grep -o -E "tty[A-Z]{3}[0-9]{0,2}" | sort -u);
COUNTER=$((COUNTER+1))
done
if [ -z "$devArr" ]; then
echo -e "\nNo Serial Devices Found, Select one later with 'changeport'\n"
else
echo -e "\nEnter TTY Number You'd Like:"
read tty
ttyselect=$devarr[(($tty+1))]
fi
echo -e "Set esp target:\n\tOne of: $(getTargets)"
read esp
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/bash
echo -e "Getting ESP Chip Info...\n"
echo -e "\nGetting ESP Chip Info...\n"
# echo -e "Base MAC Address:"
# esptool.py --port $ESPPORT --baud $ESPBAUD --chip auto read_mac
echo -e "\nChip ID:"
+3
View File
@@ -1 +1,4 @@
#!/bin/bash
echo -e "\nFlashing and Monitoring for $ESPTARGET on $ESPPORT\n"
idf.py flash monitor
echo -e "\nAll done :3\n"
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
# usage install_esp_branch v5.4.1
if [ -z "$1" ]; then
echo "usage example: `install_esp_branch v.5.4.1`"
exit
fi
rm -rf ~/esp/esp-idf
rm -rf ~/.espressif
git clone --recursive https://github.com/espressif/esp-idf.git -b "$1" ~/esp/esp-idf
bash ~/esp/esp-idf/install.sh all
python ~/esp/esp-idf/tools/idf_tools.py install all
+3
View File
@@ -1 +1,4 @@
#!/bin/bash
echo -e "\nMonitoring on $ESPPORT\n"
idf.py monitor
echo -e "\nAll done :3\n"
Submodule esp-idf deleted from 565cca2fee
+46 -49
View File
@@ -2,25 +2,55 @@
# set -e # uncomment for die on error
startTime=$(date '+%s') # to time the (re)install time for the logs
# full order:
# set action string variable
# set sleepMins int variable
# redefine any other vars needed
# handleStart
# handleClearInstallLog
# handleLogoutAllUsers
# handleSetupEnvironment
# handleCustomBins
# handleDownloadInstall
# handleExport
# handleAliasEnviron
# handleLogoutAllUsers
# handleEnd
# handleReboot
# exit
# always run globals and boilerplate
# get us our FUCKING ALIASES HOLY FUCK GOD DAMN SHIT FUCK IT\
source $rcFile 2>/dev/null # >2?/dev/null is to redirect any errors
rcFile="$HOME/.zshrc" # shell rc file
defaultInstallDir="$HOME/esp"
if [ -z "$2" ]; then
gitBranch=master # branch from github
else
gitBranch=$2
fi
rcFile=$HOME/.zshrc # shell rc file
if [ -z "$ESPIDFTOOLS_INSTALLDIR" ]; then
# cant seem to get this one to use writeToLog
echo "ESPIDFTOOLS_INSTALLDIR environment variable not found, appending to $rcFile"
echo "export ESPIDFTOOLS_INSTALLDIR=\"$defaultInstallDir\"" >> $rcFile
installDir="$defaultInstallDir"
aliasInstallDirChk=$?
else
echo "ESPIDFTOOLS_INSTALLDIR environment variable found, skipping"
installDir="$ESPIDFTOOLS_INSTALLDIR"
aliasInstallDirChk=0
fi
gitJobs=5 # number of jobs to download from github with
# gitJobs=default # default for no --jobs x arg, integar for a number of jobs
rebootMins=3 # minutes of warning before reboot
defaultInstallDir="$HOME/esp"
# get us our FUCKING ALIASES HOLY FUCK GOD DAMN SHIT FUCK IT\
source $rcFile 2>/dev/null # >2?/dev/null is to redirect any errors
log="" # log file
versionData="" # version data log file
idfDir="" # esp-idf path
customBinLocation="" # where custom bin scripts are placed
log=$installDir/install.log # log file
versionData=$installDir/version-data.log # version data log file
idfDir=$installDir/esp-idf # esp-idf path
exportScript=$idfDir/export.sh # export script
customBinLocation=$installDir/.custom_bin # where custom bin scripts are placed
espressifLocation=$HOME/.espressif # espressif tools install location
runningDir="$( cd "$( dirname "$0" )" && pwd )"
customBinFrom=$runningDir/custom_bin # dir where custom scripts are coming FROM
@@ -29,7 +59,6 @@ exportBackupScript=$runningDir/export.sh.bak # back up to running dir
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
# commands
if [ "$gitJobs" == "default" ]; then
gitCloneCmd="git clone --single-branch --depth 1 --recursive --branch $gitBranch https://github.com/espressif/esp-idf $idfDir"
else
@@ -37,11 +66,8 @@ else
fi
gitUpdateCmd="git -C $idfDir reset --hard; git -C $idfDir clean -df; git -C $idfDir pull $idfDir" # mayhapsnasst?
installCmd="$idfDir/install.sh all"
toolsInstallCmd="python $idfDir/tools/idf_tools.py install all"
idfGet="update" # default method
# default values for retcodes
@@ -74,23 +100,6 @@ rmCustomBinChk=0
sleepChk=0
rmExportBackupChk=0
# full order:
# set action string variable
# set sleepMins int variable
# redefine any other vars needed
# handleStart
# handleClearInstallLog
# handleLogoutAllUsers
# handleSetupEnvironment
# handleCustomBins
# handleDownloadInstall
# handleExport
# handleAliasEnviron
# handleLogoutAllUsers
# handleEnd
# handleReboot
# exit
function returnStatus() {
ret=$?
strii="\tReturn status: $ret"
@@ -356,8 +365,13 @@ function handleDownloadInstall() {
}
handleReboot() {
if [ $sleepMins -eq 0 ]; then
messagePTS "Rebooting NOW"
sudo reboot
else
messagePTS "\n\nRebooting in $sleepMins minutes\ncancel with 'shutdown -c'!!\n\n"
sudo shutdown -r +$rebootMins
fi
}
function handleCheckEspIdf() {
@@ -370,23 +384,6 @@ function handleCheckEspIdf() {
}
function handleStart() {
if [ -z $ESPIDFTOOLS_INSTALLDIR ]; then
writeToLog "ESPIDFTOOLS_INSTALLDIR environment variable not found, appending to $rcFile"
echo "export ESPIDFTOOLS_INSTALLDIR=\"$defaultInstallDir\"" >> $rcFile
installDir="$defaultInstallDir"
aliasInstallDirChk=$?
else
writeToLog "ESPIDFTOOLS_INSTALLDIR environment variable already installed, skipping\n"
installDir="$ESPIDFTOOLS_INSTALLDIR"
aliasInstallDirChk=0
fi
log=$installDir/install.log # log file
versionData=$installDir/version-data.log # version data log file
idfDir=$installDir/esp-idf # esp-idf path
exportScript=$idfDir/export.sh # export script
customBinLocation=$installDir/.custom_bin # where custom bin scripts are placed
if [ -z $sleepMins ]; then
sleepMins="disabled"
fi
+16
View File
@@ -1,9 +1,25 @@
x export
x changeport
x erase-flash
x setup
x espinfo
x changetarget
x changebaud
x clean
x help-esp-tools
x run-esp-cmd [help h -h --help]
flashmonitor
monitor
text export and changeesp
test help on cmd, help-esp-tools
test sourced scrips changebaud, changeesp, changeport
test menuconfig, monitor, flashmonitor, exit-esp-tools
test / fix / remove esp-idf-tools-cmd.sh options
reboot immediately when reset is set to 0 mins
remove unneeded code
check header on install version log
audit readme
maybe pretty up
test all for bugs