#!/bin/sh


# workaround for bug #7306
URI_ACTION='toshl=toshldaemon.desktop'
DEFAULTS_FILE=/usr/share/applications/uri-action-defaults.list
SED_LINE="2a\\${URI_ACTION}"

echo "Checking uri-action-defaults.list"
IS_THERE=`grep -m 1 -c $URI_ACTION $DEFAULTS_FILE`
if [ $IS_THERE -lt 1 ]; then
    echo "Modifying file"
    sed -i $SED_LINE $DEFAULTS_FILE
    update-desktop-database
fi

hildon-theme-cacher /usr/share/themes/toshl/

exit 0