#!/bin/sh -e

gtk-update-icon-cache -f /usr/share/icons/hicolor

oldversion="$2"
if [ -z "$oldversion" ]; then

    if ! (maemo-select-menu-location gCardSys.desktop); then
	echo "graphic mode not running"
    fi

    # # have a working example
    # if ! [ -d ~/MyDocs/ ]; then
    # 	mkdir ~/MyDocs/
    # fi
    # cp -rf /usr/share/doc/gcardsys ~/MyDocs/
    # chmod -R a+rw ~/MyDocs/gcardsys/

    # chmod -R a+rw /usr/share/doc/gcardsys 
    # /usr/share/doc got purged on the device, use /opt instead.
    chmod -R a+rw /opt/gcardsys 
fi

exit 0
