From 1ecd18e2a84d4dd1141e880c36262efb8fd259c3 Mon Sep 17 00:00:00 2001 From: Ryan Amos <49767442+rbamos@users.noreply.github.com> Date: Fri, 12 Jul 2024 12:26:30 -0400 Subject: [PATCH] Rollback --- rollback_setup.sh | 47 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/rollback_setup.sh b/rollback_setup.sh index 0b8ef1f..e227209 100755 --- a/rollback_setup.sh +++ b/rollback_setup.sh @@ -7,17 +7,36 @@ while true; do esac done -# Uninstall Leapp CLI -brew uninstall Noovolari/brew/leapp-cli -# Uninstall Session Manager Plugin -brew uninstall --cask session-manager-plugin -# Uninstall AWS CLI -brew uninstall awscli -# Remove AWS credential files -rm -rf ~/.aws -# Uninstall python -brew uninstall python --ignore-dependencies python -# Uninstall homebrew -sudo /bin/bash -cf "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)" -# Uninstall the Xcode CLT (this may be installed as part of homebrew) -sudo rm -rf /Library/Developer/CommandLineTools +kernel_name=$(uname -s) + +if [[ "$kernel_name" == 'Darwin' ]]; then + # Uninstall Leapp CLI + brew uninstall Noovolari/brew/leapp-cli + # Uninstall Session Manager Plugin + brew uninstall --cask session-manager-plugin + # Uninstall AWS CLI + brew uninstall awscli + # Remove AWS credential files + rm -rf ~/.aws + # Uninstall python + brew uninstall python --ignore-dependencies python + # Uninstall homebrew + sudo /bin/bash -cf "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)" + # Uninstall the Xcode CLT (this may be installed as part of homebrew) + sudo rm -rf /Library/Developer/CommandLineTools +elif [[ "$kernel_name" == 'Linux' ]]; then + # Uninstall Leapp CLI + sudo npm uninstall -g @noovolari/leapp-cli + # Remove node + sudo apt remove -y npm + sudo apt remove -y nodejs + # Remove leapp + sudo dpkg -r leapp + sudo dpkg -P leapp + # Remove session-manager-plugin + sudo dpkg -r session-manager-plugin + sudo dpkg -P session-manager-plugin + # Remove AWS CLI + sudo apt remove -y awscli + # Don't remove python! +fi