Compare commits
10 Commits
0a6abf36ca
...
2d95e06b12
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d95e06b12 | |||
| c7c4ee8526 | |||
| 9a375c61c9 | |||
| f15f72bd0f | |||
| 4832c7779b | |||
| 278b130850 | |||
| 909434aba2 | |||
| e7eaf22b30 | |||
| 206b1ac82a | |||
| 6e066b866a |
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+8
-7
@@ -19,11 +19,11 @@ commitHash=commitTAG
|
||||
installDate=installDateTAG
|
||||
branchData=branchDataTAG
|
||||
|
||||
if [ -z "$ESPIDTOOLS_INSTALLDIR" ]; then
|
||||
if [ -z "$ESPIDFTOOLS_INSTALLDIR" ]; then
|
||||
echo -e "\nFAIL: ESPIDFTOOLS_INSTALLDIR environment variable not found!\nReinstall via script or manually add to ~/.bashrc\n"
|
||||
fi
|
||||
|
||||
binDir="$ESPIDFTOOLS_INSTALLDIR/.custom_bin"
|
||||
binDir="$ESPDIR/.custom_bin"
|
||||
|
||||
echo -e "\nChecking for Serial Devices in dmesg\n"
|
||||
COUNTER=0
|
||||
@@ -46,14 +46,14 @@ echo -e "Set esp target:\n\tOne of: $(getTargets)"
|
||||
read esp
|
||||
|
||||
# echo -e "\nSetting environment variables\n"
|
||||
export PATH="$ESPIDFTOOLS_INSTALLDIR/.custom_bin:$PATH"
|
||||
export PATH="$ESPDIR/.custom_bin:$PATH"
|
||||
export ESPPORT="$ttyselect"
|
||||
export ESPBAUD=460800
|
||||
export ESPTARGET="$esp"
|
||||
export examples="$ESPIDFTOOLS_INSTALLDIR/esp-idf/examples"
|
||||
export examples="$ESPDIR/esp-idf/examples"
|
||||
|
||||
echo -e "Installation Variables:"
|
||||
tail -1 "$ESPIDFTOOLS_INSTALLDIR/version-data.log"
|
||||
tail -1 "$ESPDIR/version-data.log"
|
||||
echo -e "\tesp-idf-toolsversion: $versionData"
|
||||
echo -e "\tesp-idf version: $ESP_IDF_VERSION"
|
||||
echo -e "\tcommmit hash: $commitHash"
|
||||
@@ -65,6 +65,7 @@ echo -e "\nEnvironment Variables:"
|
||||
echo -e "\tESPBAUD = $ESPBAUD"
|
||||
echo -e "\tESPTARGET = $ESPTARGET"
|
||||
echo -e "\tESPPORT = $ESPPORT"
|
||||
echo -e "\tESPDIR: $ESPDIR"
|
||||
echo -e "\tESPIDFTOOLS_INSTALLDIR = $ESPIDFTOOLS_INSTALLDIR"
|
||||
echo -e "\tESP_IDF_VERSION = $ESP_IDF_VERSION"
|
||||
echo -e "\tbinDir = $binDir"
|
||||
@@ -76,8 +77,8 @@ alias changebaud="source $binDir/changebaud.sh"
|
||||
alias changeesp="source $binDir/changeesp.sh"
|
||||
alias exit-esp-tools="source $binDir/exit-esp-tools.sh"
|
||||
|
||||
# echo -e "Changing dir to $ESPIDFTOOLS_INSTALLDIR"
|
||||
# cd $ESPIDFTOOLS_INSTALLDIR
|
||||
# echo -e "Changing dir to $ESPDIR"
|
||||
# cd $ESPDIR
|
||||
|
||||
echo -e "\nesp-idf version: $ESP_IDF_VERSION commit $commitHash from branch $branchData"
|
||||
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+1
-37
@@ -4,7 +4,7 @@
|
||||
if [ ! -z "$1" ]; then
|
||||
export ESPPORT="$1"
|
||||
echo "ESPPORT set to $ESPPORT"
|
||||
return 0
|
||||
return
|
||||
fi
|
||||
|
||||
# gloals
|
||||
@@ -30,39 +30,3 @@ fi
|
||||
# finally expport
|
||||
export ESPPORT="$ttyselect"
|
||||
echo "ESPPORT set to $ESPPORT"
|
||||
|
||||
return 0
|
||||
function subprocess() {
|
||||
echo -e "\nChanging ESPPORT\n"
|
||||
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
|
||||
echo -e "$COUNTER /dev/$line"
|
||||
devarr+=("/dev/$line")
|
||||
COUNTER=$(($COUNTER+1))
|
||||
done
|
||||
|
||||
if [ $COUNTER -gt 0 ]; then
|
||||
echo -e "\nEnter TTY Number You'd Like:"
|
||||
read tty
|
||||
ttyselect="${devarr[$tty+1]}"
|
||||
else
|
||||
echo -e "\nNo Serial Devices Found, Select one later with 'changeport'\n"
|
||||
fi
|
||||
|
||||
sel=$tty+1
|
||||
eval "$1=${devarr[$sel]}" # set dat ret global var here
|
||||
}
|
||||
|
||||
if [ ! -z "$1" ]; then
|
||||
ret="$1"
|
||||
else
|
||||
ret="" # make this a global so it can be updootewd from inside function
|
||||
subprocess ret
|
||||
fi
|
||||
|
||||
export ESPPORT="$ret"
|
||||
|
||||
echo -e "\nESPPORT set to $ESPPORT\n"
|
||||
echo -e "\nAll done :3\n"
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+5
-4
@@ -1,10 +1,11 @@
|
||||
#!/bin/bash
|
||||
echo "esp-idf-tools install dir (\$ESPIDFTOOLS_INSTALLDIR): $ESPIDFTOOLS_INSTALLDIR"
|
||||
echo "esp-idf-tools custom_bin dir: $ESPIDFTOOLS_INSTALLDIR/.custom_bin/"
|
||||
echo "esp dir (\$ESPDIR): $ESPDIR"
|
||||
echo "esp-idf-tools custom_bin dir: $ESPDIR/.custom_bin/"
|
||||
echo "tools:"
|
||||
ls "$ESPIDFTOOLS_INSTALLDIR/.custom_bin/"
|
||||
echo "esp-idf-tools version: $(cat $ESPIDFTOOLS_INSTALLDIR/.custom_bin/version.txt)"
|
||||
echo "esp-idf-tools last install: $(tail -1 $ESPIDFTOOLS_INSTALLDIR/version-data.log)"
|
||||
ls "$ESPDIR/.custom_bin/"
|
||||
echo "esp-idf-tools version: $(cat $ESPDIR/.custom_bin/version.txt)"
|
||||
echo "esp-idf-tools last install: $(tail -1 $ESPDIR/version-data.log)"
|
||||
echo "esp-idf path (\$IDF_PATH): $IDF_PATH"
|
||||
echo "esp-idf version (\$ESP_IDF_VERSION): $ESP_IDF_VERSION"
|
||||
echo "esp-idf python path (\$IDF_PYTHON_ENV_PATH): $IDF_PYTHON_ENV_PATH"
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+1
-1
@@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
cat $ESPIDFTOOLS_INSTALLDIR/.custom_bin/help.txt
|
||||
cat $ESPDIR/.custom_bin/help.txt
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+3
-3
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
echo -e "\napplyan a patch~ $1 to $ESPIDFTOOLS_INSTALLDIR/esp-idf\n"
|
||||
cp "$1" "$ESPIDFTOOLS_INSTALLDIR/esp-idf"
|
||||
git -C "$ESPIDFTOOLS_INSTALLDIR/esp-idf" apply "$1"
|
||||
echo -e "\napplyan a patch~ $1 to $ESPDIR/esp-idf\n"
|
||||
cp "$1" "$ESPDIR/esp-idf"
|
||||
git -C "$ESPDIR/esp-idf" apply "$1"
|
||||
echo -e "\nall donseies~\n"
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+6
-7
@@ -22,7 +22,7 @@ startTime=$(date '+%s') # to time the (re)install time for the logs
|
||||
# always run globals and boilerplate
|
||||
# check for help first
|
||||
if [[ "$1" == "--help" || "$1" == "help" || "$1" == "-h" || "$1" == "h" ]]; then
|
||||
helpText=$ESPIDFTOOLS_INSTALLDIR/.custom_bin/help.txt
|
||||
helpText=$ESPDIR/.custom_bin/help.txt
|
||||
cat "$helpText"
|
||||
|
||||
exit
|
||||
@@ -46,10 +46,10 @@ fi
|
||||
rcFile="$HOME/.bashrc" # absolute path only
|
||||
# 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
|
||||
if [ -z $ESPIDFTOOLS_INSTALLDIR ]; then
|
||||
if [ -z "$ESPDIR" ]; then
|
||||
installDir="$HOME/esp"
|
||||
else
|
||||
installDir="$ESPIDFTOOLS_INSTALLDIR"
|
||||
installDir="$ESPDIR"
|
||||
fi
|
||||
|
||||
if [ -z "$2" ]; then
|
||||
@@ -170,7 +170,7 @@ function handleCheckInstallPackages() {
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -z $installPackagees ]; then
|
||||
if [ ! -z "$installPackagees" ]; then
|
||||
writeToLog "Missing packages found! Installing: $installPackagees"
|
||||
sudo apt install -y "$installPackagees"
|
||||
returnStatus
|
||||
@@ -307,9 +307,8 @@ function testAppendAlias() {
|
||||
|
||||
function handleAliasEnviron() {
|
||||
cp $rcFile $rcFile.bak # backup da thing first frong
|
||||
# the pretty comment and such first
|
||||
testAppendAlias "# esp-idf-tools aliases" "\n\n# esp-idf-tools"
|
||||
testAppendAlias "ESPIDFTOOLS_INSTALLDIR" "export ESPIDFTOOLS_INSTALLDIR=\"$installDir\""
|
||||
testAppendAlias "ESPDIR" "export ESPDIR=\"$installDir\""
|
||||
testAppendAlias "ESPIDFTOOLS_INSTALLDIR" "export ESPIDFTOOLS_INSTALLDIR=\"$installDir/esp-idf-tools\""
|
||||
testAppendAlias "get-esp-tools" "alias get-esp-tools='. $exportScript'"
|
||||
testAppendAlias "run-esp-cmd" "alias run-esp-cmd='bash $runningDir/esp-idf-tools-cmd.sh'"
|
||||
testAppendAlias "esp-install-monitor" "alias esp-install-monitor='tail -n 75 -f $log'"
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
+75
-75
@@ -1,76 +1,76 @@
|
||||
nuke:
|
||||
no --single-branch
|
||||
Git clone completed in 566 seconds
|
||||
Installer completed in 251 seconds
|
||||
Extra tools installer completed in 138 seconds
|
||||
reinstall completed in 957 seconds
|
||||
with --single-branch
|
||||
Git CLONE completed in 398 seconds # markedly faster
|
||||
Installer completed in 277 seconds # slightly slower
|
||||
Extra tools installer completed in 169 seconds # slighly slower
|
||||
reinstall completed in 846 seconds # still a bit faster
|
||||
|
||||
further study is required
|
||||
|
||||
|
||||
exportCatChk
|
||||
pkgInstallChk # doesnt always runnn
|
||||
gitChk # is set by eithr clone or pull
|
||||
installChk
|
||||
toolsInstallChk # usually errors~
|
||||
exportSedReturnChk
|
||||
exportSedVersionChk
|
||||
exportSedDateChk
|
||||
exportSedHashChk
|
||||
aliasRunEspReinstallChk
|
||||
aliasEspMonitorchk
|
||||
aliasEspLogsChk
|
||||
aliasInstallDirChk
|
||||
|
||||
x warnChk // after loop of warning users
|
||||
x logoutChk // after loop of logging out users
|
||||
x gitLogChk // after apppending the git log to $versionData
|
||||
x gitHashChk // on get git hash
|
||||
x rmIdfDirChk // on delete esp-idf dir
|
||||
x rmEspressifChk // on delete .espressif dir
|
||||
x mkInstallDirChk // on create install dir
|
||||
x restoreExportScriptChk // on restoring the export.sh.bak
|
||||
x rmExportScriptCh // on deleting export script
|
||||
x backupExportScriptChk // on backing up the new export.sh.bak
|
||||
x customBinExecChk // on making custom scripts executable
|
||||
x cpCustomBinChk // copying the new custom scripts
|
||||
x rmCustomBinChk // on delete custom bins dir
|
||||
sleepChk // on wake from sleep\
|
||||
|
||||
# default values for retcodes
|
||||
exportCatChk=0
|
||||
pkgInstallChk=0
|
||||
gitChk=0
|
||||
installChk=0
|
||||
toolsInstallChk=0
|
||||
exportSedReturnChk=0
|
||||
exportSedVersionChk=0
|
||||
exportSedDateChk=0
|
||||
exportSedHashChk=0
|
||||
aliasRunEspReinstallChk=0
|
||||
aliasEspMonitorchk=0
|
||||
aliasEspLogsChk=0
|
||||
aliasInstallDirChk=0
|
||||
warnChk=0
|
||||
logoutChk=0
|
||||
gitLogChk=0
|
||||
gitHashChk=0
|
||||
rmIdfDirChk=0
|
||||
rmEspressifChk=0
|
||||
mkInstallDirChk=0
|
||||
restoreExportScriptChk=0
|
||||
rmExportScriptChk=0
|
||||
backupExportScriptChk=0
|
||||
customBinExecChk=0
|
||||
cpCustomBinChk=0
|
||||
rmCustomBinChk=0
|
||||
sleepChk=0
|
||||
rmExportBackupChk=0
|
||||
|
||||
|
||||
nuke:
|
||||
no --single-branch
|
||||
Git clone completed in 566 seconds
|
||||
Installer completed in 251 seconds
|
||||
Extra tools installer completed in 138 seconds
|
||||
reinstall completed in 957 seconds
|
||||
with --single-branch
|
||||
Git CLONE completed in 398 seconds # markedly faster
|
||||
Installer completed in 277 seconds # slightly slower
|
||||
Extra tools installer completed in 169 seconds # slighly slower
|
||||
reinstall completed in 846 seconds # still a bit faster
|
||||
|
||||
further study is required
|
||||
|
||||
|
||||
exportCatChk
|
||||
pkgInstallChk # doesnt always runnn
|
||||
gitChk # is set by eithr clone or pull
|
||||
installChk
|
||||
toolsInstallChk # usually errors~
|
||||
exportSedReturnChk
|
||||
exportSedVersionChk
|
||||
exportSedDateChk
|
||||
exportSedHashChk
|
||||
aliasRunEspReinstallChk
|
||||
aliasEspMonitorchk
|
||||
aliasEspLogsChk
|
||||
aliasInstallDirChk
|
||||
|
||||
x warnChk // after loop of warning users
|
||||
x logoutChk // after loop of logging out users
|
||||
x gitLogChk // after apppending the git log to $versionData
|
||||
x gitHashChk // on get git hash
|
||||
x rmIdfDirChk // on delete esp-idf dir
|
||||
x rmEspressifChk // on delete .espressif dir
|
||||
x mkInstallDirChk // on create install dir
|
||||
x restoreExportScriptChk // on restoring the export.sh.bak
|
||||
x rmExportScriptCh // on deleting export script
|
||||
x backupExportScriptChk // on backing up the new export.sh.bak
|
||||
x customBinExecChk // on making custom scripts executable
|
||||
x cpCustomBinChk // copying the new custom scripts
|
||||
x rmCustomBinChk // on delete custom bins dir
|
||||
sleepChk // on wake from sleep\
|
||||
|
||||
# default values for retcodes
|
||||
exportCatChk=0
|
||||
pkgInstallChk=0
|
||||
gitChk=0
|
||||
installChk=0
|
||||
toolsInstallChk=0
|
||||
exportSedReturnChk=0
|
||||
exportSedVersionChk=0
|
||||
exportSedDateChk=0
|
||||
exportSedHashChk=0
|
||||
aliasRunEspReinstallChk=0
|
||||
aliasEspMonitorchk=0
|
||||
aliasEspLogsChk=0
|
||||
aliasInstallDirChk=0
|
||||
warnChk=0
|
||||
logoutChk=0
|
||||
gitLogChk=0
|
||||
gitHashChk=0
|
||||
rmIdfDirChk=0
|
||||
rmEspressifChk=0
|
||||
mkInstallDirChk=0
|
||||
restoreExportScriptChk=0
|
||||
rmExportScriptChk=0
|
||||
backupExportScriptChk=0
|
||||
customBinExecChk=0
|
||||
cpCustomBinChk=0
|
||||
rmCustomBinChk=0
|
||||
sleepChk=0
|
||||
rmExportBackupChk=0
|
||||
|
||||
|
||||
shutdown -k "message" // send out warning and disable logins, but do not shutdown
|
||||
Regular → Executable
Regular → Executable
Reference in New Issue
Block a user