-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·70 lines (60 loc) · 2.05 KB
/
uninstall.sh
File metadata and controls
executable file
·70 lines (60 loc) · 2.05 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
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
set -e
echo "========================================================================="
echo ""
echo " ABUS Uninstaller [Version 3.0]"
echo " contact: abus.aikorea@gmail.com"
echo ""
echo "========================================================================="
echo ""
# Get script directory
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
# Ask for confirmation
echo "This will remove the installer_files folder."
read -p "Do you want to continue? (y/N): " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Uninstallation cancelled."
exit 0
fi
# Terminate running Python processes (if any)
echo "Terminating running Python processes..."
pkill -f "python.*start-abus.py" || true
sleep 2
# Ask about system packages
echo ""
read -p "Would you like to remove system packages (ffmpeg, git, etc.)? (y/N): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Removing system packages..."
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS - using Homebrew
if command -v brew &> /dev/null; then
brew uninstall ffmpeg git || true
fi
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
# Linux
if command -v apt-get &> /dev/null; then
sudo apt-get remove -y git ffmpeg build-essential || true
elif command -v yum &> /dev/null; then
sudo yum remove -y git ffmpeg gcc gcc-c++ make || true
elif command -v dnf &> /dev/null; then
sudo dnf remove -y git ffmpeg gcc gcc-c++ make || true
elif command -v pacman &> /dev/null; then
sudo pacman -R --noconfirm git ffmpeg base-devel || true
fi
fi
fi
# Remove installer_files folder
if [ -d "$SCRIPT_DIR/installer_files" ]; then
echo "Deleting installer_files folder..."
echo "Please wait a moment"
rm -rf "$SCRIPT_DIR/installer_files"
echo "installer_files folder deleted."
fi
echo ""
echo "ABUS uninstall.sh finished."
echo ""
echo "Note: The application folder itself was not deleted."
echo "To completely remove ABUS, delete this entire folder."