#!/bin/sh add_entry() { local profile="$1" local line='XDG_DATA_DIRS="/opt/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"' grep -q "^${line}"'$' "${profile}" || { if [ ! -f "${profile}" ] then touch "${profile}" fi cp "${profile}" "${profile}.new" && \ echo >>"${profile}.new" && \ echo "${line}" >>"${profile}.new" && \ echo 'export XDG_DATA_DIRS' >>"${profile}.new" && \ mv "${profile}.new" "${profile}" } } update-desktop-database /opt/share/applications update-mime-database /opt/share/mime #osso-update-category-database /usr/share/mime ##gtk-update-icon-cache -f -t /opt/share/icons/hicolor add_entry "/etc/profile.env" if [ "$1" = "configure" -a -z "$2" -a -x /usr/bin/maemo-select-menu-location ] then /usr/bin/maemo-select-menu-location traveller.desktop fi