#!/bin/bash

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/fdo-3.6.0/lib

echo

echo "Unregistering Autodesk FDO Provider for Oracle"
./unregister_provider Autodesk.Oracle.3.6

echo "Unregistering OSGeo FDO Provider for ArcSDE"
./unregister_provider OSGeo.ArcSDE.3.6

echo "Unregistering Autodesk FDO Provider for Raster"
./unregister_provider Autodesk.Raster.3.6

echo "Unregistering OSGeo FDO Provider for SDF"
./unregister_provider OSGeo.SDF.3.6

echo "Unregistering OSGeo FDO Provider for SQLite"
./unregister_provider OSGeo.SQLite.3.6

echo "Unregistering OSGeo FDO Provider for SHP"
./unregister_provider OSGeo.SHP.3.6

echo "Unregistering OSGeo FDO Provider for WFS"
./unregister_provider OSGeo.WFS.3.6

echo "Unregistering OSGeo FDO Provider for WMS"
./unregister_provider OSGeo.WMS.3.6

echo "Unregistering OSGeo FDO Provider for MySQL"
./unregister_provider OSGeo.MySQL.3.6

echo "Unregistering OSGeo FDO Provider for ODBC"
./unregister_provider OSGeo.ODBC.3.6

echo "Unregistering OSGeo FDO Provider for PostgreSQL"
./unregister_provider OSGeo.PostgreSQL.3.6

echo
echo "Uninstalling Autodesk FDO Provider for Oracle"
rpm --erase fdo-rdbms-3.6.0.11003-1.i386

echo "Uninstalling OSGeo FDO Provider for ArcSDE"
rpm --erase fdo-arcsde-3.6.0.11003-1.i386

echo "Uninstalling Autodesk FDO Provider for Raster"
rpm --erase fdo-raster-3.6.0.11003-1.i386

echo "Uninstalling ATIL Session"
rpm --erase fdo-atil-session-3.6.0.11003-1.i386

echo "Uninstalling OSGeo FDO Provider for SDF"
rpm --erase fdo-sdf-3.6.0.11003-1.i386

echo "Uninstalling OSGeo FDO Provider for SQLite"
rpm --erase fdo-sqlite-3.6.0.11003-1.i386

echo "Uninstalling OSGeo FDO Provider for SHP"
rpm --erase fdo-shp-3.6.0.11003-1.i386

echo "Uninstalling OSGeo FDO Provider for WFS"
rpm --erase fdo-wfs-3.6.0.11003-1.i386

echo "Uninstalling OSGeo FDO Provider for WMS"
rpm --erase fdo-wms-3.6.0.11003-1.i386

echo "Uninstalling OSGeo FDO Provider for MySQL"
rpm --erase fdo-mysql-3.6.0.11003-1.i386

echo "Uninstalling OSGeo FDO Provider for ODBC"
rpm --erase fdo-odbc-3.6.0.11003-1.i386

echo "Uninstalling OSGeo FDO Provider for PostgreSQL"
rpm --erase fdo-postgresql-3.6.0.11003-1.i386

echo "Uninstalling User Manager"
rpm --erase fdo-user-mgr-3.6.0.11003-1.i386

echo "Uninstalling Expression Engine"
rpm --erase fdo-expression-engine-3.6.0.11003-1.i386

echo "Uninstalling Fdo"
rpm --erase fdo-3.6.0.11003-1.i386

rm -f /usr/local/fdo-3.6.0/unregister_provider
rm -f /usr/local/fdo-3.6.0/uninstall
