From 831a70e3dd3d997ba5d54eefcdeb7eced7260a39 Mon Sep 17 00:00:00 2001 From: hPrnicessPi3 Date: Sat, 10 May 2025 00:25:01 -0600 Subject: [PATCH] testiung for release 3 --- CHANGELOG.txt | 6 +++++- custom_bin/help-esp-tools | 1 + custom_bin/menuconfig | 5 ++++- custom_bin/step-flash-monitor | 2 +- esp-idf-tools-cmd.sh | 15 ++++++++++++++- todo.txt | 2 ++ 6 files changed, 27 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 57bb906..9305069 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,4 +6,8 @@ 9-rc-final fixed and renamed ESPIDF_INSTALLDIR ESPIDFTOOLS_INSTALLDIR - removed install branch command \ No newline at end of file + removed install branch command + various bug fixes + various error checking added + added bash shell support (experimental) + full testing done \ No newline at end of file diff --git a/custom_bin/help-esp-tools b/custom_bin/help-esp-tools index 0d65898..6887c8b 100644 --- a/custom_bin/help-esp-tools +++ b/custom_bin/help-esp-tools @@ -1 +1,2 @@ +#!/bin/bash cat $ESPIDFTOOLS_INSTALLDIR/.custom_bin/help.txt diff --git a/custom_bin/menuconfig b/custom_bin/menuconfig index a07bfea..42e2c09 100644 --- a/custom_bin/menuconfig +++ b/custom_bin/menuconfig @@ -1 +1,4 @@ -idf.py menuconfig \ No newline at end of file +#!/bin/bash +echo -e "\nRunning Menuconfig\n" +idf.py menuconfig +echo -e "\nAll done :3\n" \ No newline at end of file diff --git a/custom_bin/step-flash-monitor b/custom_bin/step-flash-monitor index 0c5212c..227323a 100644 --- a/custom_bin/step-flash-monitor +++ b/custom_bin/step-flash-monitor @@ -1,5 +1,5 @@ #!/bin/bash -set -e # die on error in theory +set -e # die on error echo -e "Clean, build, flash, monitor in steps, dying on error" diff --git a/esp-idf-tools-cmd.sh b/esp-idf-tools-cmd.sh index b5fbf26..b55f894 100644 --- a/esp-idf-tools-cmd.sh +++ b/esp-idf-tools-cmd.sh @@ -21,9 +21,22 @@ startTime=$(date '+%s') # to time the (re)install time for the logs # always run globals and boilerplate +defShell=$(awk -F: -v user="$USER" '$1 == user {print $NF}' /etc/passwd) + +if [[ "$defShell" =~ zsh$ ]]; then + echo -e "\nSelected zsh shell automatically\n" + rcFile="$HOME/.zshrc" +elif [[ "$defShell" =~ bash$ ]]; then + echo -e "\nSelected bash shell automatically\n" + rcFile="$HOME/.bashrc" +else + echo "unsupported shell $defShell" + exit +fi + # 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 +source $rcFile 2>/dev/null # >2?/dev/null is to redirect any errors defaultInstallDir="$HOME/esp" if [ -z "$2" ]; then diff --git a/todo.txt b/todo.txt index e9e8349..8a316c7 100644 --- a/todo.txt +++ b/todo.txt @@ -30,6 +30,8 @@ remove unneeded code add new stuff to error checking +support bashhhh + x text export and changeesp x test help on cmd, help-esp-tools x test sourced scrips changebaud, changeesp, changeport