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 9-rc-final
fixed and renamed ESPIDF_INSTALLDIR ESPIDFTOOLS_INSTALLDIR fixed and renamed ESPIDF_INSTALLDIR ESPIDFTOOLS_INSTALLDIR
removed install branch command
+9 -6
View File
@@ -19,14 +19,13 @@ commitHash=commitTAG
installDate=installDateTAG installDate=installDateTAG
branchData=branchDataTAG 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" echo -e "\nFAIL: ESPIDFTOOLS_INSTALLDIR environment variable not found!\nReinstall via script or manually add to ~/.zshrc\n"
exit
fi fi
binDir="$ESPIDFTOOLS_INSTALLDIR/.custom_bin" binDir="$ESPIDFTOOLS_INSTALLDIR/.custom_bin"
echo -e "\nTTY devices found in dmesg:" echo -e "\nChecking for Serial Devices in dmesg\n"
COUNTER=0 COUNTER=0
devarr=() devarr=()
for line in $(dmesg | tail -50 | grep -o -E "tty[A-Z]{3}[0-9]{0,2}" | sort -u); do 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)) COUNTER=$((COUNTER+1))
done done
echo -e "\nEnter TTY Number You'd Like:" if [ -z "$devArr" ]; then
read tty echo -e "\nNo Serial Devices Found, Select one later with 'changeport'\n"
ttyselect=$devarr[(($tty+1))] 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)" echo -e "Set esp target:\n\tOne of: $(getTargets)"
read esp read esp
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
echo -e "Getting ESP Chip Info...\n" echo -e "\nGetting ESP Chip Info...\n"
# echo -e "Base MAC Address:" # echo -e "Base MAC Address:"
# esptool.py --port $ESPPORT --baud $ESPBAUD --chip auto read_mac # esptool.py --port $ESPPORT --baud $ESPBAUD --chip auto read_mac
echo -e "\nChip ID:" 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 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 idf.py monitor
echo -e "\nAll done :3\n"
Submodule esp-idf deleted from 565cca2fee
+48 -51
View File
@@ -2,25 +2,55 @@
# set -e # uncomment for die on error # 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
# 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 if [ -z "$2" ]; then
gitBranch=master # branch from github gitBranch=master # branch from github
else else
gitBranch=$2 gitBranch=$2
fi 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=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 rebootMins=3 # minutes of warning before reboot
defaultInstallDir="$HOME/esp" log=$installDir/install.log # log file
versionData=$installDir/version-data.log # version data log file
# get us our FUCKING ALIASES HOLY FUCK GOD DAMN SHIT FUCK IT\ idfDir=$installDir/esp-idf # esp-idf path
source $rcFile 2>/dev/null # >2?/dev/null is to redirect any errors exportScript=$idfDir/export.sh # export script
customBinLocation=$installDir/.custom_bin # where custom bin scripts are placed
log="" # log file
versionData="" # version data log file
idfDir="" # esp-idf path
customBinLocation="" # where custom bin scripts are placed
espressifLocation=$HOME/.espressif # espressif tools install location espressifLocation=$HOME/.espressif # espressif tools install location
runningDir="$( cd "$( dirname "$0" )" && pwd )" runningDir="$( cd "$( dirname "$0" )" && pwd )"
customBinFrom=$runningDir/custom_bin # dir where custom scripts are coming FROM 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 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 arg=$1 # just rename the argument var for clarity with the functions
# commands
if [ "$gitJobs" == "default" ]; then if [ "$gitJobs" == "default" ]; then
gitCloneCmd="git clone --single-branch --depth 1 --recursive --branch $gitBranch https://github.com/espressif/esp-idf $idfDir" gitCloneCmd="git clone --single-branch --depth 1 --recursive --branch $gitBranch https://github.com/espressif/esp-idf $idfDir"
else else
@@ -37,11 +66,8 @@ else
fi fi
gitUpdateCmd="git -C $idfDir reset --hard; git -C $idfDir clean -df; git -C $idfDir pull $idfDir" # mayhapsnasst? gitUpdateCmd="git -C $idfDir reset --hard; git -C $idfDir clean -df; git -C $idfDir pull $idfDir" # mayhapsnasst?
installCmd="$idfDir/install.sh all" installCmd="$idfDir/install.sh all"
toolsInstallCmd="python $idfDir/tools/idf_tools.py install all" toolsInstallCmd="python $idfDir/tools/idf_tools.py install all"
idfGet="update" # default method idfGet="update" # default method
# default values for retcodes # default values for retcodes
@@ -74,23 +100,6 @@ rmCustomBinChk=0
sleepChk=0 sleepChk=0
rmExportBackupChk=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() { function returnStatus() {
ret=$? ret=$?
strii="\tReturn status: $ret" strii="\tReturn status: $ret"
@@ -356,8 +365,13 @@ function handleDownloadInstall() {
} }
handleReboot() { handleReboot() {
messagePTS "\n\nRebooting in $sleepMins minutes\ncancel with 'shutdown -c'!!\n\n" if [ $sleepMins -eq 0 ]; then
sudo shutdown -r +$rebootMins 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() { function handleCheckEspIdf() {
@@ -370,23 +384,6 @@ function handleCheckEspIdf() {
} }
function handleStart() { 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 if [ -z $sleepMins ]; then
sleepMins="disabled" sleepMins="disabled"
fi 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 text export and changeesp
test help on cmd, help-esp-tools test help on cmd, help-esp-tools
test sourced scrips changebaud, changeesp, changeport test sourced scrips changebaud, changeesp, changeport
test menuconfig, monitor, flashmonitor, exit-esp-tools test menuconfig, monitor, flashmonitor, exit-esp-tools
test / fix / remove esp-idf-tools-cmd.sh options test / fix / remove esp-idf-tools-cmd.sh options
reboot immediately when reset is set to 0 mins
remove unneeded code remove unneeded code
check header on install version log
audit readme audit readme
maybe pretty up maybe pretty up
test all for bugs test all for bugs