-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·48 lines (39 loc) · 1.81 KB
/
uninstall.sh
File metadata and controls
executable file
·48 lines (39 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
source ./core/colors.sh
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
echo ""
echo -e "$COLOR_BOLD$COLOR_BLUE __ __.__ $COLOR_RESET"
echo -e "$COLOR_BOLD$COLOR_BLUE \ \ |__|__| _____ $COLOR_RESET"
echo -e "$COLOR_BOLD$COLOR_BLUE \ \ | | |/ \ $COLOR_RESET"
echo -e "$COLOR_BOLD$COLOR_BLUE / / | | | Y Y \ $COLOR_RESET"
echo -e "$COLOR_BOLD$COLOR_BLUE /_/ /\__| |__|__|_| / $COLOR_RESET"
echo -e "$COLOR_BOLD$COLOR_BLUE \______| \/ $COLOR_RESET"
echo ""
if [ ! -z "$(command -v jim)" ] >/dev/null; then
echo -e "${COLOR_BOLD}${COLOR_YELLOW}Removing jim… $COLOR_RESET"
echo ""
echo -e "${COLOR_CYAN}You need to grant permission in order to remove the jim command${COLOR_RESET}"
echo ""
sudo rm /usr/local/bin/jim
echo -e "${COLOR_YELLOW} ✓ jim executable removed${COLOR_RESET}️"
if [ -e /etc/bash_completion.d ]; then
# linux autocompletion path
sudo rm /etc/bash_completion.d/jim
echo -e "${COLOR_YELLOW} ✓ autocompletion removed${COLOR_RESET}️"
elif [ -e /usr/local/etc/bash_completion.d ]; then
# osx autocompletion path; if bash completion is installed
sudo rm /usr/local/etc/bash_completion.d/jim
echo -e "${COLOR_YELLOW} ✓ autocompletion removed${COLOR_RESET}️"
fi
echo ""
if [[ $SHELL == *"zsh"* && "$1" != "--local" ]]; then
echo -e "${COLOR_CYAN}Hey, seems like you are using zsh.${COLOR_RESET}"
echo -e "${COLOR_CYAN}Put these lines in your .zshrc-file to enable autocompletion:${COLOR_RESET}"
echo -e "\n\tautoload bashcompinit"
echo -e "\tbashcompinit"
echo -e "\tsource $autocompletePath\n"
fi
echo -e "${COLOR_CYAN}The 'jim' command has been removed.${COLOR_RESET}"
else
echo -e "${COLOR_CYAN}jim is not installed${COLOR_RESET}"
fi