#!/bin/bash

if [[ $USER = "root" ]]; then
    echo "You should run this script as user, not as root."
    exit 1
fi

# app files
INSTALL_FOLDER="/opt/ikeybase"

sudo rm -r "$INSTALL_FOLDER"
sudo rm /usr/share/icons/hicolor/128x128/apps/ikeybase.png
sudo rm /usr/share/applications/ikeybase.desktop

rm "`xdg-user-dir DESKTOP`"/ikeybase.desktop

# rules
sudo rm /etc/udev/rules.d/99-hid.rules
sudo rm /etc/modprobe.d/blacklist-libnfc.conf
