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

if [ -x /usr/bin/update-mime-database ]; then
  /usr/bin/update-mime-database usr/share/mime >/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 -f usr/share/icons/hicolor >/dev/null 2>&1
  fi
fi
( cd usr/share/pixmaps ; rm -rf qgis.png )
( cd usr/share/pixmaps ; ln -sf /usr/share/qgis/images/icons/qgis-icon.png qgis.png )
( cd usr/share/pixmaps ; rm -rf qgis-mime.png )
( cd usr/share/pixmaps ; ln -sf /usr/share/qgis/images/icons/qgis-mime-icon.png qgis-mime.png )
( cd usr/lib ; rm -rf libqgis_core.so )
( cd usr/lib ; ln -sf libqgis_core.so.2.18.11 libqgis_core.so )
( cd usr/lib ; rm -rf libqgis_networkanalysis.so )
( cd usr/lib ; ln -sf libqgis_networkanalysis.so.2.18.11 libqgis_networkanalysis.so )
( cd usr/lib ; rm -rf libqgis_gui.so )
( cd usr/lib ; ln -sf libqgis_gui.so.2.18.11 libqgis_gui.so )
( cd usr/lib ; rm -rf libqgis_analysis.so )
( cd usr/lib ; ln -sf libqgis_analysis.so.2.18.11 libqgis_analysis.so )
( cd usr/lib ; rm -rf libqgispython.so )
( cd usr/lib ; ln -sf libqgispython.so.2.18.11 libqgispython.so )
( cd usr/lib ; rm -rf libqgis_app.so )
( cd usr/lib ; ln -sf libqgis_app.so.2.18.11 libqgis_app.so )
