#!/bin/sh

if [ "$1" = "configure" ]; then
    echo "Enabling Electrum-LTC GUI wallet in XDG Menu using 'desktop-file-install' ..."
    echo "    Menu metadata file located at: /usr/share/applications/electrum-ltc.desktop"
    if desktop-file-install /usr/share/applications/electrum-ltc.desktop; then
      echo " +++ Successfully enabled Electrum-LTC GUI wallet in the system menu. "
      echo " +++ Electrum-LTC should've been added to your system app menu, assuming it uses xdg-menu (e.g. GNOME, XFCE, and KDE)"
      echo " +++ You should be able to find Electrum-LTC in your desktop environment's \"Application Menu\""
      echo " +++ If you can't see it, try logging out and back in again, or rebooting your OS."
    else
      echo " [!!!] ERR: Command 'desktop-file-install /usr/share/applications/electrum-ltc.desktop' returned a non-zero return code."
      echo " [!!!] The Electrum-LTC application itself may have installed just fine, however it may not be present in"
      echo " [!!!] your desktop environment's \"Application Menu\"."
    fi
    echo
    echo
    echo " [!!!] NOTE: Depending on your desktop environment, you may need to manually install the electrum-ltc.desktop menu file"
    echo " [!!!] on each user account that you plan to use it on."
    echo " [!!!] To install/enable the Electrum-LTC menu entry for a user account, simply run the following command as that user:"
    echo
    echo "           desktop-file-install /usr/share/applications/electrum-ltc.desktop"
    echo
    echo
fi

