Files
f0ckm-uploader/uninstall.sh
2026-08-11 21:59:25 +02:00

52 lines
1.7 KiB
Bash

#!/bin/bash
# Configuration directories
INSTALL_DIR="$HOME/.local/bin"
APP_DIR="$HOME/.local/share/applications"
SERVICE_MENU_DIR="$HOME/.local/share/kio/servicemenus"
LEGACY_SERVICE_MENU_DIR="$HOME/.local/share/kservices5/ServiceMenus"
# 1. Remove the executable scripts
if [ -f "$INSTALL_DIR/kde-uploader" ]; then
rm "$INSTALL_DIR/kde-uploader"
echo "Removed uploader executable from $INSTALL_DIR"
fi
if [ -f "$INSTALL_DIR/kde-uploader-gui" ]; then
rm "$INSTALL_DIR/kde-uploader-gui"
echo "Removed GUI executable from $INSTALL_DIR"
fi
# 2. Remove the application entries
if [ -f "$APP_DIR/kde-uploader.desktop" ]; then
rm "$APP_DIR/kde-uploader.desktop"
echo "Removed application entry from $APP_DIR"
fi
if [ -f "$APP_DIR/kde-uploader-gui.desktop" ]; then
rm "$APP_DIR/kde-uploader-gui.desktop"
echo "Removed GUI application entry from $APP_DIR"
fi
update-desktop-database "$APP_DIR" &> /dev/null
# 3. Remove the modern KDE Service Menu entry
if [ -f "$SERVICE_MENU_DIR/kde-uploader-servicemenu.desktop" ]; then
rm "$SERVICE_MENU_DIR/kde-uploader-servicemenu.desktop"
echo "Removed service menu entry from $SERVICE_MENU_DIR"
fi
# 4. Remove the legacy KDE Service Menu entry
if [ -f "$LEGACY_SERVICE_MENU_DIR/kde-uploader-servicemenu.desktop" ]; then
rm "$LEGACY_SERVICE_MENU_DIR/kde-uploader-servicemenu.desktop"
echo "Removed legacy service menu entry from $LEGACY_SERVICE_MENU_DIR"
fi
# 5. Remove autostart entry
AUTOSTART_FILE="$HOME/.config/autostart/kde-uploader-gui.desktop"
if [ -f "$AUTOSTART_FILE" ]; then
rm "$AUTOSTART_FILE"
echo "Removed autostart entry"
fi
echo "Uninstallation complete! The custom upload options, GUI, and scripts have been removed."