diff --git a/install.sh b/install.sh index 613230f..e212463 100644 --- a/install.sh +++ b/install.sh @@ -1,6 +1,21 @@ #!/bin/bash # sudo apt update # sudo apt install git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 + +# unset any esp-idf/-tools envvars +unset ESPIDFTOOLS_INSTALLDIR +unset IDF_PATH +unset ESP_IDF_VERSION +unset IDF_PYTHON_ENV_PATH +unset OPENOCD_SCRIPTS +unset ESP_ROM_ELF_DIR +unset IDF_DEACTIVATE_FILE_PATH +unset IDF_TOOLS_INSTALL_CMD +unset IDF_TOOLS_EXPORT_CMD +unset ESPPORT +unset ESPBAUD +unset ESPTARGET + mkdir -p ~/esp git clone --recursive https://github.com/PrincessPi3/esp-idf-tools.git ~/esp/esp-idf-tools bash ~/esp/esp-idf-tools/esp-idf-tools-cmd.sh # run as default noninteractive mode \ No newline at end of file diff --git a/uninstall.sh b/uninstall.sh index 73ebb37..92cc5b3 100644 --- a/uninstall.sh +++ b/uninstall.sh @@ -1,21 +1,41 @@ #!/bin/bash echo "STARTING UNINSTALLATION" + +# unset any esp-idf/-tools envvars +echo -e "\tUnsetting environment variables" +unset ESPIDFTOOLS_INSTALLDIR +unset IDF_PATH +unset ESP_IDF_VERSION +unset IDF_PYTHON_ENV_PATH +unset OPENOCD_SCRIPTS +unset ESP_ROM_ELF_DIR +unset IDF_DEACTIVATE_FILE_PATH +unset IDF_TOOLS_INSTALL_CMD +unset IDF_TOOLS_EXPORT_CMD +unset ESPPORT +unset ESPBAUD +unset ESPTARGET + # nuke dirs +echo -e "\tRemoving directories" rm -rf ~/esp/esp-idf 2>/dev/null rm -rf ~/esp/esp-dev-kits 2>/dev/null rm -rf ~/esp/esp-idf-tools 2>/dev/null rm -rf ~/.espressif 2>/dev/null # nuke logs +echo -e "\tRemoving log files" rm -f ~/esp/install.log 2>/dev/null rm -f ~/esp/version-data.log 2>/dev/null # cleanup ~/.bashrc ## with first one, make a backup ## after dat, no backups +echo -e "\tCleaning up ~/.bashrc" 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 + echo "DONE UNINSTALLING" \ No newline at end of file