# update rarian database
if [ -x usr/bin/rarian-sk-update ]; then
  usr/bin/rarian-sk-update 1> /dev/null 2> /dev/null
fi

# update mime database
if [ -x usr/bin/update-mime-database ]; then
  usr/bin/update-mime-database usr/share/mime 1> /dev/null 2> /dev/null
fi

# update desktop entries
if [ -x usr/bin/update-desktop-database ]; then
  usr/bin/update-desktop-database 1> /dev/null 2> /dev/null
fi

# update hicolor icons
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
	rm -f usr/share/icons/hicolor/icon-theme.cache
fi
usr/bin/gtk-update-icon-cache -f -q usr/share/icons/hicolor 1>/dev/null 2>/dev/null

if [ -x /usr/bin/glib-compile-schemas ]; then
  /usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas/ >/dev/null 2>&1
fi

# Restart gconfd-2 if running to reload new gconf settings
if ps acx | grep -q gconfd-2 ; then
        killall -HUP gconfd-2 ;
fi

#!/bin/sh
config() {
  NEW="$1"
  OLD="$(dirname $NEW)/$(basename $NEW .new)"
  # If there's no config file by that name, mv it over:
  if [ ! -r $OLD ]; then
    mv $NEW $OLD
  elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
    rm $NEW
  fi
  # Otherwise, we leave the .new copy for the admin to consider...
}
config usr/share/ghostscript/9.16/Resource/Init/cidfmap.new

( cd usr/doc/ghostscript-9.16 ; rm -rf doc )
( cd usr/doc/ghostscript-9.16 ; ln -sf /usr/share/ghostscript/9.16/doc doc )
( cd usr/man/de/man1 ; rm -rf ps2pdf13.1 )
( cd usr/man/de/man1 ; ln -sf ps2pdf.1 ps2pdf13.1 )
( cd usr/man/de/man1 ; rm -rf ps2pdf14.1 )
( cd usr/man/de/man1 ; ln -sf ps2pdf.1 ps2pdf14.1 )
( cd usr/man/de/man1 ; rm -rf eps2eps.1 )
( cd usr/man/de/man1 ; ln -sf ps2ps.1 eps2eps.1 )
( cd usr/man/de/man1 ; rm -rf ps2pdf12.1 )
( cd usr/man/de/man1 ; ln -sf ps2pdf.1 ps2pdf12.1 )
( cd usr/man/man1 ; rm -rf gslj.1 )
( cd usr/man/man1 ; ln -sf gslp.1 gslj.1 )
( cd usr/man/man1 ; rm -rf gsdj500.1 )
( cd usr/man/man1 ; ln -sf gslp.1 gsdj500.1 )
( cd usr/man/man1 ; rm -rf gsdj.1 )
( cd usr/man/man1 ; ln -sf gslp.1 gsdj.1 )
( cd usr/man/man1 ; rm -rf ps2pdf13.1 )
( cd usr/man/man1 ; ln -sf ps2pdf.1 ps2pdf13.1 )
( cd usr/man/man1 ; rm -rf gsbj.1 )
( cd usr/man/man1 ; ln -sf gslp.1 gsbj.1 )
( cd usr/man/man1 ; rm -rf ps2pdf14.1 )
( cd usr/man/man1 ; ln -sf ps2pdf.1 ps2pdf14.1 )
( cd usr/man/man1 ; rm -rf eps2eps.1 )
( cd usr/man/man1 ; ln -sf ps2ps.1 eps2eps.1 )
( cd usr/man/man1 ; rm -rf ps2pdf12.1 )
( cd usr/man/man1 ; ln -sf ps2pdf.1 ps2pdf12.1 )
( cd usr/lib ; rm -rf libgs.so )
( cd usr/lib ; ln -sf libgs.so.9.16 libgs.so )
( cd usr/lib ; rm -rf libgs.so.9 )
( cd usr/lib ; ln -sf libgs.so.9.16 libgs.so.9 )
( cd usr/lib ; rm -rf libijs.so )
( cd usr/lib ; ln -sf libijs-0.35.so libijs.so )
