#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

echo -n "Install Lime Suite icon resources...	"
if [ -x /usr/bin/xdg-icon-resource ] ; then
    for theme in hicolor gnome; do
        for size in 16 22 32 48 64 128; do
            xdg-icon-resource install --noupdate --context apps --theme ${theme} --size ${size} ${DIR}/lime-suite-${size}.png lime-suite || true
        done
    done
    xdg-icon-resource forceupdate || true
    echo "OK"
else
    echo "FAIL (missing xdg-icon-resource)"
fi

echo -n "Install Lime Suite menu launcher...	"
if [ -x /usr/bin/xdg-desktop-menu ] ; then
    xdg-desktop-menu install ${DIR}/lime-suite.desktop || true
    echo "OK"
else
    echo "FAIL (missing xdg-desktop-menu)"
fi
