#!/bin/bash

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

echo
echo "Installing Fdo"
rpm -i --force fdo-3.6.0.11003-1.i386.rpm

echo "Installing Expression Engine"
rpm -i --force fdo-expression-engine-3.6.0.11003-1.i386.rpm
echo

echo "Installing Autodesk FDO Provider for Oracle"
rpm -i --force fdo-rdbms-3.6.0.11003-1.i386.rpm

echo "Installing OSGeo FDO Provider for ArcSDE"
rpm -i --force fdo-arcsde-3.6.0.11003-1.i386.rpm

echo "Installing ATIL Session"
rpm -i --force fdo-atil-session-3.6.0.11003-1.i386.rpm

echo "Installing Autodesk FDO Provider for Raster"
rpm -i --force fdo-raster-3.6.0.11003-1.i386.rpm

echo "Installing OSGeo FDO Provider for SDF"
rpm -i --force fdo-sdf-3.6.0.11003-1.i386.rpm

echo "Installing OSGeo FDO Provider for SQLite"
rpm -i --force fdo-sqlite-3.6.0.11003-1.i386.rpm

echo "Installing OSGeo FDO Provider for SHP"
rpm -i --force fdo-shp-3.6.0.11003-1.i386.rpm

echo "Installing OSGeo FDO Provider for WFS"
rpm -i --force fdo-wfs-3.6.0.11003-1.i386.rpm

echo "Installing OSGeo FDO Provider for WMS"
rpm -i --force fdo-wms-3.6.0.11003-1.i386.rpm

echo "Installing OSGeo FDO Provider for MySQL"
rpm -i --force fdo-mysql-3.6.0.11003-1.i386.rpm

echo "Installing OSGeo FDO Provider for ODBC"
rpm -i --force fdo-odbc-3.6.0.11003-1.i386.rpm

echo "Installing OSGeo FDO Provider for PostgreSQL"
rpm -i --force fdo-postgresql-3.6.0.11003-1.i386.rpm

echo "Installing User Manager"
rpm -i --force fdo-user-mgr-3.6.0.11003-1.i386.rpm
echo


echo "Registering providers"
./register_providers

cp -p -f uninstall /usr/local/fdo-3.6.0
chmod 555 /usr/local/fdo-3.6.0/uninstall

cp -p -f unregister_provider /usr/local/fdo-3.6.0
chmod 555 /usr/local/fdo-3.6.0/unregister_provider

