#!/bin/sh

if [ -x /usr/bin/update-desktop-database ]; then
  update-desktop-database /usr/share/applications
fi

if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -f /usr/share/icons/hicolor
fi

if [ -x /usr/bin/maemo-select-menu-location ]; then
  maemo-select-menu-location x48.desktop
fi

test -x /usr/bin/maemo-confirm-text || exit 0

cat <<EOF > /tmp/alert.txt
This is an emulator of the HP 48 SX and GX calculators.

Access http://www.hpcalc.org for Manuals, Tips, and 
Applications for this calculator.

This version displays in landscape mode, and includes
/home/user/.hp48/rom.dump file.

HP48GX ROM revision R from hpcalc.org.

EOF

maemo-confirm-text "x48" /tmp/alert.txt

rm -f /tmp/alert.txt

#Setup correct owner!
/bin/chown -R 29999:29999 /home/user/.hp48

exit 0
