m0ar fizax

This commit is contained in:
2025-08-18 20:19:04 -06:00
parent 1187567c29
commit 5d0814788a
3 changed files with 21 additions and 19 deletions
+6 -13
View File
@@ -301,30 +301,23 @@ function handleSetupEnvironment() {
} }
function testAppendAlias() { function testAppendAlias() {
echo "Testing alias '$1'" echo "Testing alias '$1' in $rcFile"
alias $1 2>/dev/null # redirect errrors to keep it lookan clean grep -q "$1" "$rcFile"
ret=$? ret=$?
if [ ! $ret -eq 0 ]; then if [ ! $ret -eq 0 ]; then
writeToLog "$1 not found, appending to $rcFile" writeToLog "ailas $1 not found, appending to $rcFile"
echo "$2" >> "$rcFile" echo "$2" >> "$rcFile"
returnStatus returnStatus
else else
writeToLog "$1 found: $(alias $1), skipping\n" writeToLog "$1 found in $rcFile, skipping\n"
fi fi
return $ret return $ret
} }
function handleAliasEnviron() { function handleAliasEnviron() {
grep -q '# esp-idf-tools' $rcFile # the pretty comment and such first
ret=$? testAppendAlias "# esp-idf-tools aliases" "\n# esp-idf-tools\n"
# add the friendly comment to the rcfile if its not there :3
if [ ! $ret -eq 0 ]; then
writeToLog "Adding esp-idf-tools aliases to $rcFile"
echo -e "\n# esp-idf-tools\n" >> $rcFile
fi
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'"
+4 -4
View File
@@ -6,10 +6,10 @@ esp-idf-cools-cmd.sh
interactive/install/i seems to not work properly. variable scope? interactive/install/i seems to not work properly. variable scope?
get update properly workan frong get update properly workan frong
some kinda more meaningful status indication instead of endless terminal spam? some kinda more meaningful status indication instead of endless terminal spam?
install.sh for curl -s github/install.sh | exec $SHELL installation x install.sh for curl -s github/install.sh | exec $SHELL installation
interactive by default or defaults mode m (seems to go noninteractive by default?) interactive by default or defaults mode
test da shit proper in bash finafrickingly lmfao x test da shit proper in bash finafrickingly lmfao
changeport/changeport.sh x changeport/changeport.sh
x recheck espinfo x recheck espinfo
x recheck changeesp/changeesp.sh x recheck changeesp/changeesp.sh
x recheck changebaud/changebaud.sh x recheck changebaud/changebaud.sh
+11 -2
View File
@@ -1,10 +1,19 @@
#!/bin/bash #!/bin/bash
echo STARTING UNINSTALLATION echo STARTING UNINSTALLATION
# nuke dirs
rm -rf ~/esp/esp-idf 2>/dev/null rm -rf ~/esp/esp-idf 2>/dev/null
rm -rf ~/esp/esp-dev-kits 2>/dev/null rm -rf ~/esp/esp-dev-kits 2>/dev/null
rm -rf ~/esp/esp-idf-tools 2>/dev/null rm -rf ~/esp/esp-idf-tools 2>/dev/null
rm -rf ~/.espressif 2>/dev/null rm -rf ~/.espressif 2>/dev/null
# nuke logs
rm -f ~/esp/install.log 2>/dev/null rm -f ~/esp/install.log 2>/dev/null
rm -f ~/esp/version-data.log 2>/dev/null rm -f ~/esp/version-data.log 2>/dev/null
echo DONE
# handle removing aliases from ~/.bashrc # cleanup ~/.bashrc
# with first one, make a backup
sed -i.bak '/# esp-idf-tools/d' ~/.bashrc
sed -i '/get-esp-tools/d' ~/.bashrc
sed -i '/run-esp-cmd/d' ~/.bashrc
sed -i '/esp-install-monitor/d' ~/.bashrc
sed -i '/esp-install-logs/d' ~/.bashrc