#!/bin/bash

# uninstaller for linux
echo "uninstalling hoytoba"

install_dir="$HOME/.opt/hoytoba"
desktop_file_path="$HOME/.local/share/applications/hoytoba.desktop"

if [ -f "${desktop_file_path}" ]; then
    echo "removing desktop file from ${desktop_file_path}"
    rm "$HOME/.local/share/applications/hoytoba.desktop"
else
    echo "desktop file not found at ${desktop_file_path}, ignoring"
fi

if [ -d "${install_dir}" ]; then
    echo "removing installation from ${install_dir}"
    rm -rf "$HOME/.opt/hoytoba"
else
    echo "installation not found at ${install_dir}, ignoring"
fi
