#!/bin/bash

WINGHOME="`dirname "$0"`/../../.."

case "$1" in
    --install)
        MODE=install
        ;;
    --uninstall)
        MODE=uninstall
        ;;
    *)
        echo "$0 [--help|--install|--uninstall]"
        echo ""
        exit 1
        ;;
esac

for size in 16 32 48 64 128
do
    xdg-icon-resource $MODE --novendor --noupdate --size $size $WINGHOME/resources/wing$size.png wingpro7
done
xdg-icon-resource forceupdate

xdg-desktop-menu $MODE --novendor $WINGHOME/resources/linux/desktop/wingpro7.desktop
xdg-mime $MODE --novendor $WINGHOME/resources/linux/desktop/wingpro7.xml
