|
| 1 | +#!/usr/bin/env sh |
| 2 | +# |
| 3 | +# GarudaNvim uninstaller for macOS. |
| 4 | + |
| 5 | +# Welcome message |
| 6 | +echo |
| 7 | +echo |
| 8 | +echo "GarudaNvim Uninstaller!" |
| 9 | +echo |
| 10 | +echo "==================================================================================================================" |
| 11 | +echo |
| 12 | + |
| 13 | +# Step 1: Check if GarudaNvim is installed |
| 14 | +echo "Step 1: Checking if GarudaNvim is installed in ~/.config/nvim/lua/garudanvim" |
| 15 | +echo "------------------------------------------------------------------------------------------------------------------" |
| 16 | +if [ -d ~/.config/nvim/lua/garudanvim ]; then |
| 17 | + echo "INFO: GarudaNvim configuration found." |
| 18 | + echo "Running the uninstallation process." |
| 19 | + echo |
| 20 | +else |
| 21 | + echo "ERROR: GarudaNvim is not found in your system." |
| 22 | + echo " Cannot proceed with the uninstallation process." |
| 23 | + echo |
| 24 | + exit 1 |
| 25 | +fi |
| 26 | + |
| 27 | +# Step 1.5: Ask for final confirmation before proceeding |
| 28 | +read -p "Are you sure you want to uninstall GarudaNvim? (y/n): " confirm |
| 29 | +if [ "$confirm" != "y" ]; then |
| 30 | + echo |
| 31 | + echo "Happy Coding with GarudaNvim!" |
| 32 | + echo |
| 33 | + exit 0 |
| 34 | +fi |
| 35 | +echo |
| 36 | + |
| 37 | +# Step 2: Uninstallation Process |
| 38 | +echo "Step 2: Removing GarudaNvim and related Neovim configuration directories" |
| 39 | +echo "------------------------------------------------------------------------------------------------------------------" |
| 40 | +echo "We're sorry to see you leave GarudaNvim!" |
| 41 | +echo "Proceeding with the uninstallation..." |
| 42 | +echo |
| 43 | +rm -rf ~/.config/nvim |
| 44 | +rm -rf ~/.local/share/nvim |
| 45 | +rm -rf ~/.local/state/nvim |
| 46 | +rm -rf ~/.cache/nvim |
| 47 | +echo "INFO: GarudaNvim and its related files and folders have been removed." |
| 48 | +echo |
| 49 | +echo "==================================================================================================================" |
| 50 | +echo |
| 51 | + |
| 52 | +# Final message |
| 53 | +echo "GarudaNvim has been completely uninstalled." |
| 54 | +echo |
| 55 | +echo "If you faced any issues with GarudaNvim, we'd gladly take your feedback." |
| 56 | +echo "Please visit the official GarudaNvim GitHub page to raise an issue." |
| 57 | +echo "Thanks for using GarudaNvim!" |
| 58 | +echo |
| 59 | +echo |
0 commit comments