# 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

# A good idea whenever kernel modules are added or changed:
if [ -x sbin/depmod ]; then
  /sbin/depmod -a 1> /dev/null 2> /dev/null
fi

( cd usr/lib ; rm -rf libopencv_stitching.so.2.4 )
( cd usr/lib ; ln -sf libopencv_stitching.so.2.4.9 libopencv_stitching.so.2.4 )
( cd usr/lib ; rm -rf libopencv_ml.so )
( cd usr/lib ; ln -sf libopencv_ml.so.2.4 libopencv_ml.so )
( cd usr/lib ; rm -rf libopencv_objdetect.so )
( cd usr/lib ; ln -sf libopencv_objdetect.so.2.4 libopencv_objdetect.so )
( cd usr/lib ; rm -rf libopencv_contrib.so.2.4 )
( cd usr/lib ; ln -sf libopencv_contrib.so.2.4.9 libopencv_contrib.so.2.4 )
( cd usr/lib ; rm -rf libopencv_features2d.so )
( cd usr/lib ; ln -sf libopencv_features2d.so.2.4 libopencv_features2d.so )
( cd usr/lib ; rm -rf libopencv_features2d.so.2.4 )
( cd usr/lib ; ln -sf libopencv_features2d.so.2.4.9 libopencv_features2d.so.2.4 )
( cd usr/lib ; rm -rf libopencv_nonfree.so.2.4 )
( cd usr/lib ; ln -sf libopencv_nonfree.so.2.4.9 libopencv_nonfree.so.2.4 )
( cd usr/lib ; rm -rf libopencv_ml.so.2.4 )
( cd usr/lib ; ln -sf libopencv_ml.so.2.4.9 libopencv_ml.so.2.4 )
( cd usr/lib ; rm -rf libopencv_stitching.so )
( cd usr/lib ; ln -sf libopencv_stitching.so.2.4 libopencv_stitching.so )
( cd usr/lib ; rm -rf libopencv_gpu.so.2.4 )
( cd usr/lib ; ln -sf libopencv_gpu.so.2.4.9 libopencv_gpu.so.2.4 )
( cd usr/lib ; rm -rf libopencv_photo.so.2.4 )
( cd usr/lib ; ln -sf libopencv_photo.so.2.4.9 libopencv_photo.so.2.4 )
( cd usr/lib ; rm -rf libopencv_gpu.so )
( cd usr/lib ; ln -sf libopencv_gpu.so.2.4 libopencv_gpu.so )
( cd usr/lib ; rm -rf libopencv_objdetect.so.2.4 )
( cd usr/lib ; ln -sf libopencv_objdetect.so.2.4.9 libopencv_objdetect.so.2.4 )
( cd usr/lib ; rm -rf libopencv_nonfree.so )
( cd usr/lib ; ln -sf libopencv_nonfree.so.2.4 libopencv_nonfree.so )
( cd usr/lib ; rm -rf libopencv_superres.so )
( cd usr/lib ; ln -sf libopencv_superres.so.2.4 libopencv_superres.so )
( cd usr/lib ; rm -rf libopencv_core.so.2.4 )
( cd usr/lib ; ln -sf libopencv_core.so.2.4.9 libopencv_core.so.2.4 )
( cd usr/lib ; rm -rf libopencv_video.so )
( cd usr/lib ; ln -sf libopencv_video.so.2.4 libopencv_video.so )
( cd usr/lib ; rm -rf libopencv_calib3d.so )
( cd usr/lib ; ln -sf libopencv_calib3d.so.2.4 libopencv_calib3d.so )
( cd usr/lib ; rm -rf libopencv_flann.so.2.4 )
( cd usr/lib ; ln -sf libopencv_flann.so.2.4.9 libopencv_flann.so.2.4 )
( cd usr/lib ; rm -rf libopencv_imgproc.so.2.4 )
( cd usr/lib ; ln -sf libopencv_imgproc.so.2.4.9 libopencv_imgproc.so.2.4 )
( cd usr/lib ; rm -rf libopencv_ocl.so )
( cd usr/lib ; ln -sf libopencv_ocl.so.2.4 libopencv_ocl.so )
( cd usr/lib ; rm -rf libopencv_photo.so )
( cd usr/lib ; ln -sf libopencv_photo.so.2.4 libopencv_photo.so )
( cd usr/lib ; rm -rf libopencv_contrib.so )
( cd usr/lib ; ln -sf libopencv_contrib.so.2.4 libopencv_contrib.so )
( cd usr/lib ; rm -rf libopencv_videostab.so )
( cd usr/lib ; ln -sf libopencv_videostab.so.2.4 libopencv_videostab.so )
( cd usr/lib ; rm -rf libopencv_imgproc.so )
( cd usr/lib ; ln -sf libopencv_imgproc.so.2.4 libopencv_imgproc.so )
( cd usr/lib ; rm -rf libopencv_core.so )
( cd usr/lib ; ln -sf libopencv_core.so.2.4 libopencv_core.so )
( cd usr/lib ; rm -rf libopencv_highgui.so )
( cd usr/lib ; ln -sf libopencv_highgui.so.2.4 libopencv_highgui.so )
( cd usr/lib ; rm -rf libopencv_superres.so.2.4 )
( cd usr/lib ; ln -sf libopencv_superres.so.2.4.9 libopencv_superres.so.2.4 )
( cd usr/lib ; rm -rf libopencv_calib3d.so.2.4 )
( cd usr/lib ; ln -sf libopencv_calib3d.so.2.4.9 libopencv_calib3d.so.2.4 )
( cd usr/lib ; rm -rf libopencv_flann.so )
( cd usr/lib ; ln -sf libopencv_flann.so.2.4 libopencv_flann.so )
( cd usr/lib ; rm -rf libopencv_ocl.so.2.4 )
( cd usr/lib ; ln -sf libopencv_ocl.so.2.4.9 libopencv_ocl.so.2.4 )
( cd usr/lib ; rm -rf libopencv_highgui.so.2.4 )
( cd usr/lib ; ln -sf libopencv_highgui.so.2.4.9 libopencv_highgui.so.2.4 )
( cd usr/lib ; rm -rf libopencv_video.so.2.4 )
( cd usr/lib ; ln -sf libopencv_video.so.2.4.9 libopencv_video.so.2.4 )
( cd usr/lib ; rm -rf libopencv_legacy.so.2.4 )
( cd usr/lib ; ln -sf libopencv_legacy.so.2.4.9 libopencv_legacy.so.2.4 )
( cd usr/lib ; rm -rf libopencv_legacy.so )
( cd usr/lib ; ln -sf libopencv_legacy.so.2.4 libopencv_legacy.so )
( cd usr/lib ; rm -rf libopencv_videostab.so.2.4 )
( cd usr/lib ; ln -sf libopencv_videostab.so.2.4.9 libopencv_videostab.so.2.4 )
