#!/bin/sh
## ----------------------------------------------------------------------
## debian/postinst : postinstallation script for pyrecipe
## ----------------------------------------------------------------------

## ----------------------------------------------------------------------
set -e

##Setting permissions for config directory and for the binary link.
chown -R user:users /home/user/.pyrecipe
chmod +x /usr/bin/pyrecipe
echo "updated permissions"

#Updating the menu icon. It's slow but the icon is shown in the installation.
gtk-update-icon-cache -f /usr/share/icons/hicolor


#If there isn't installed a old version, show the menu-location dialog.
oldversion="$2"
if [ -z "$oldversion" ]; then
  maemo-select-menu-location pyrecipe.desktop
fi

exit 0
