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
|
installDate=installDateTAG
|
||||||
branchData=branchDataTAG
|
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"
|
echo -e "\nFAIL: ESPIDFTOOLS_INSTALLDIR environment variable not found!\nReinstall via script or manually add to ~/.bashrc\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
binDir="$ESPIDFTOOLS_INSTALLDIR/.custom_bin"
|
binDir="$ESPDIR/.custom_bin"
|
||||||
|
|
||||||
echo -e "\nChecking for Serial Devices in dmesg\n"
|
echo -e "\nChecking for Serial Devices in dmesg\n"
|
||||||
COUNTER=0
|
COUNTER=0
|
||||||
@@ -46,14 +46,14 @@ echo -e "Set esp target:\n\tOne of: $(getTargets)"
|
|||||||
read esp
|
read esp
|
||||||
|
|
||||||
# echo -e "\nSetting environment variables\n"
|
# echo -e "\nSetting environment variables\n"
|
||||||
export PATH="$ESPIDFTOOLS_INSTALLDIR/.custom_bin:$PATH"
|
export PATH="$ESPDIR/.custom_bin:$PATH"
|
||||||
export ESPPORT="$ttyselect"
|
export ESPPORT="$ttyselect"
|
||||||
export ESPBAUD=460800
|
export ESPBAUD=460800
|
||||||
export ESPTARGET="$esp"
|
export ESPTARGET="$esp"
|
||||||
export examples="$ESPIDFTOOLS_INSTALLDIR/esp-idf/examples"
|
export examples="$ESPDIR/esp-idf/examples"
|
||||||
|
|
||||||
echo -e "Installation Variables:"
|
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-toolsversion: $versionData"
|
||||||
echo -e "\tesp-idf version: $ESP_IDF_VERSION"
|
echo -e "\tesp-idf version: $ESP_IDF_VERSION"
|
||||||
echo -e "\tcommmit hash: $commitHash"
|
echo -e "\tcommmit hash: $commitHash"
|
||||||
@@ -65,6 +65,7 @@ echo -e "\nEnvironment Variables:"
|
|||||||
echo -e "\tESPBAUD = $ESPBAUD"
|
echo -e "\tESPBAUD = $ESPBAUD"
|
||||||
echo -e "\tESPTARGET = $ESPTARGET"
|
echo -e "\tESPTARGET = $ESPTARGET"
|
||||||
echo -e "\tESPPORT = $ESPPORT"
|
echo -e "\tESPPORT = $ESPPORT"
|
||||||
|
echo -e "\tESPDIR: $ESPDIR"
|
||||||
echo -e "\tESPIDFTOOLS_INSTALLDIR = $ESPIDFTOOLS_INSTALLDIR"
|
echo -e "\tESPIDFTOOLS_INSTALLDIR = $ESPIDFTOOLS_INSTALLDIR"
|
||||||
echo -e "\tESP_IDF_VERSION = $ESP_IDF_VERSION"
|
echo -e "\tESP_IDF_VERSION = $ESP_IDF_VERSION"
|
||||||
echo -e "\tbinDir = $binDir"
|
echo -e "\tbinDir = $binDir"
|
||||||
@@ -76,8 +77,8 @@ alias changebaud="source $binDir/changebaud.sh"
|
|||||||
alias changeesp="source $binDir/changeesp.sh"
|
alias changeesp="source $binDir/changeesp.sh"
|
||||||
alias exit-esp-tools="source $binDir/exit-esp-tools.sh"
|
alias exit-esp-tools="source $binDir/exit-esp-tools.sh"
|
||||||
|
|
||||||
# echo -e "Changing dir to $ESPIDFTOOLS_INSTALLDIR"
|
# echo -e "Changing dir to $ESPDIR"
|
||||||
# cd $ESPIDFTOOLS_INSTALLDIR
|
# cd $ESPDIR
|
||||||
|
|
||||||
echo -e "\nesp-idf version: $ESP_IDF_VERSION commit $commitHash from branch $branchData"
|
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
|
if [ ! -z "$1" ]; then
|
||||||
export ESPPORT="$1"
|
export ESPPORT="$1"
|
||||||
echo "ESPPORT set to $ESPPORT"
|
echo "ESPPORT set to $ESPPORT"
|
||||||
return 0
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# gloals
|
# gloals
|
||||||
@@ -30,39 +30,3 @@ fi
|
|||||||
# finally expport
|
# finally expport
|
||||||
export ESPPORT="$ttyselect"
|
export ESPPORT="$ttyselect"
|
||||||
echo "ESPPORT set to $ESPPORT"
|
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
|
#!/bin/bash
|
||||||
echo "esp-idf-tools install dir (\$ESPIDFTOOLS_INSTALLDIR): $ESPIDFTOOLS_INSTALLDIR"
|
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:"
|
echo "tools:"
|
||||||
ls "$ESPIDFTOOLS_INSTALLDIR/.custom_bin/"
|
ls "$ESPDIR/.custom_bin/"
|
||||||
echo "esp-idf-tools version: $(cat $ESPIDFTOOLS_INSTALLDIR/.custom_bin/version.txt)"
|
echo "esp-idf-tools version: $(cat $ESPDIR/.custom_bin/version.txt)"
|
||||||
echo "esp-idf-tools last install: $(tail -1 $ESPIDFTOOLS_INSTALLDIR/version-data.log)"
|
echo "esp-idf-tools last install: $(tail -1 $ESPDIR/version-data.log)"
|
||||||
echo "esp-idf path (\$IDF_PATH): $IDF_PATH"
|
echo "esp-idf path (\$IDF_PATH): $IDF_PATH"
|
||||||
echo "esp-idf version (\$ESP_IDF_VERSION): $ESP_IDF_VERSION"
|
echo "esp-idf version (\$ESP_IDF_VERSION): $ESP_IDF_VERSION"
|
||||||
echo "esp-idf python path (\$IDF_PYTHON_ENV_PATH): $IDF_PYTHON_ENV_PATH"
|
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
|
#!/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
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
echo -e "\napplyan a patch~ $1 to $ESPIDFTOOLS_INSTALLDIR/esp-idf\n"
|
echo -e "\napplyan a patch~ $1 to $ESPDIR/esp-idf\n"
|
||||||
cp "$1" "$ESPIDFTOOLS_INSTALLDIR/esp-idf"
|
cp "$1" "$ESPDIR/esp-idf"
|
||||||
git -C "$ESPIDFTOOLS_INSTALLDIR/esp-idf" apply "$1"
|
git -C "$ESPDIR/esp-idf" apply "$1"
|
||||||
echo -e "\nall donseies~\n"
|
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
|
# always run globals and boilerplate
|
||||||
# check for help first
|
# check for help first
|
||||||
if [[ "$1" == "--help" || "$1" == "help" || "$1" == "-h" || "$1" == "h" ]]; then
|
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"
|
cat "$helpText"
|
||||||
|
|
||||||
exit
|
exit
|
||||||
@@ -46,10 +46,10 @@ fi
|
|||||||
rcFile="$HOME/.bashrc" # absolute path only
|
rcFile="$HOME/.bashrc" # absolute path only
|
||||||
# get us our FUCKING ALIASES HOLY FUCK GOD DAMN SHIT FUCK IT\
|
# 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
|
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"
|
installDir="$HOME/esp"
|
||||||
else
|
else
|
||||||
installDir="$ESPIDFTOOLS_INSTALLDIR"
|
installDir="$ESPDIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$2" ]; then
|
if [ -z "$2" ]; then
|
||||||
@@ -170,7 +170,7 @@ function handleCheckInstallPackages() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -z $installPackagees ]; then
|
if [ ! -z "$installPackagees" ]; then
|
||||||
writeToLog "Missing packages found! Installing: $installPackagees"
|
writeToLog "Missing packages found! Installing: $installPackagees"
|
||||||
sudo apt install -y "$installPackagees"
|
sudo apt install -y "$installPackagees"
|
||||||
returnStatus
|
returnStatus
|
||||||
@@ -307,9 +307,8 @@ function testAppendAlias() {
|
|||||||
|
|
||||||
function handleAliasEnviron() {
|
function handleAliasEnviron() {
|
||||||
cp $rcFile $rcFile.bak # backup da thing first frong
|
cp $rcFile $rcFile.bak # backup da thing first frong
|
||||||
# the pretty comment and such first
|
testAppendAlias "ESPDIR" "export ESPDIR=\"$installDir\""
|
||||||
testAppendAlias "# esp-idf-tools aliases" "\n\n# esp-idf-tools"
|
testAppendAlias "ESPIDFTOOLS_INSTALLDIR" "export ESPIDFTOOLS_INSTALLDIR=\"$installDir/esp-idf-tools\""
|
||||||
testAppendAlias "ESPIDFTOOLS_INSTALLDIR" "export ESPIDFTOOLS_INSTALLDIR=\"$installDir\""
|
|
||||||
testAppendAlias "get-esp-tools" "alias get-esp-tools='. $exportScript'"
|
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 "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'"
|
testAppendAlias "esp-install-monitor" "alias esp-install-monitor='tail -n 75 -f $log'"
|
||||||
|
|||||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Reference in New Issue
Block a user