-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·55 lines (46 loc) · 1.04 KB
/
uninstall.sh
File metadata and controls
executable file
·55 lines (46 loc) · 1.04 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
49
50
51
52
53
54
55
#!/usr/bin/env bash
#
# deemon uninstallation script
#
set -e
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
info() { echo -e "${GREEN}[INFO]${NC} $1"; }
warn() { echo -e "${YELLOW}[WARN]${NC} $1"; }
echo ""
echo "=================================="
echo " deemon Uninstall Script"
echo "=================================="
echo ""
# Find pip command
if command -v pip3 &> /dev/null; then
PIP_CMD="pip3"
elif command -v pip &> /dev/null; then
PIP_CMD="pip"
else
echo "Error: pip not found"
exit 1
fi
# Check if deemon is installed
if ! $PIP_CMD show deemon &> /dev/null; then
warn "deemon is not installed"
exit 0
fi
warn "This will uninstall deemon."
read -p "Continue? [y/N] " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
info "Uninstall cancelled"
exit 0
fi
info "Uninstalling deemon..."
$PIP_CMD uninstall -y deemon
info "deemon has been uninstalled"
echo ""
info "Note: Your configuration and database are preserved at:"
info " ~/.config/deemon/"
info " ~/.local/share/deemon/"
echo ""