-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·43 lines (34 loc) · 850 Bytes
/
uninstall.sh
File metadata and controls
executable file
·43 lines (34 loc) · 850 Bytes
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
#!/usr/bin/env bash
set -euo pipefail
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m'
INSTALL_DIR="${HOME}/.local/share/tmp-git-clone"
SYMLINK_PATH="${HOME}/.local/bin/tmp-git-clone"
info() {
echo -e "${BLUE}==>${NC} $1"
}
success() {
echo -e "${GREEN}==>${NC} $1"
}
main() {
echo ""
echo -e "${BLUE}tmp-git-clone uninstaller${NC}"
echo ""
if [ -L "$SYMLINK_PATH" ] || [ -f "$SYMLINK_PATH" ]; then
info "Removing symlink..."
rm "$SYMLINK_PATH"
fi
if [ -d "$INSTALL_DIR" ]; then
info "Removing installation directory..."
rm -rf "$INSTALL_DIR"
fi
success "Uninstallation complete!"
echo ""
echo "Note: Config and history at ~/.tmp-git-clone/ were preserved."
echo "Run 'rm -rf ~/.tmp-git-clone' to remove them."
echo ""
}
main