if [ -x /usr/bin/update-desktop-database ]; then
  /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi

if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
  if [ -x /usr/bin/gtk-update-icon-cache ]; then
    /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
  fi
fi
( cd usr/bin ; rm -rf ti99sim-catalog )
( cd usr/bin ; ln -sf ../../opt/ti99sim/bin/catalog ti99sim-catalog )
( cd usr/bin ; rm -rf ti99sim-console )
( cd usr/bin ; ln -sf ../../opt/ti99sim/bin/ti99sim-console ti99sim-console )
( cd usr/bin ; rm -rf ti99sim-convert-ctg )
( cd usr/bin ; ln -sf ../../opt/ti99sim/bin/convert-ctg ti99sim-convert-ctg )
( cd usr/bin ; rm -rf ti99sim-decode )
( cd usr/bin ; ln -sf ../../opt/ti99sim/bin/decode ti99sim-decode )
( cd usr/bin ; rm -rf ti99sim-disk )
( cd usr/bin ; ln -sf ../../opt/ti99sim/bin/disk ti99sim-disk )
( cd usr/bin ; rm -rf ti99sim-dumpcpu )
( cd usr/bin ; ln -sf ../../opt/ti99sim/bin/dumpcpu ti99sim-dumpcpu )
( cd usr/bin ; rm -rf ti99sim-dumpgrom )
( cd usr/bin ; ln -sf ../../opt/ti99sim/bin/dumpgrom ti99sim-dumpgrom )
( cd usr/bin ; rm -rf ti99sim-dumpspch )
( cd usr/bin ; ln -sf ../../opt/ti99sim/bin/dumpspch ti99sim-dumpspch )
( cd usr/bin ; rm -rf ti99sim-list )
( cd usr/bin ; ln -sf ../../opt/ti99sim/bin/list ti99sim-list )
( cd usr/bin ; rm -rf ti99sim-mkcart )
( cd usr/bin ; ln -sf ../../opt/ti99sim/bin/mkcart ti99sim-mkcart )
( cd usr/bin ; rm -rf ti99sim-mkspch )
( cd usr/bin ; ln -sf ../../opt/ti99sim/bin/mkspch ti99sim-mkspch )
( cd usr/bin ; rm -rf ti99sim-say )
( cd usr/bin ; ln -sf ../../opt/ti99sim/bin/say ti99sim-say )
( cd usr/bin ; rm -rf ti99sim-sdl )
( cd usr/bin ; ln -sf ../../opt/ti99sim/bin/ti99sim-sdl ti99sim-sdl )
( cd usr/share/pixmaps ; rm -rf ti99sim.png )
( cd usr/share/pixmaps ; ln -sf ../icons/hicolor/48x48/apps/ti99sim.png ti99sim.png )
