#!/bin/bash

###########################################
# Instalacion de firebird en debian
# por Juan Antonio Castillo H
# jachguate
# http://jachguate.wordpress.com
# jachguate@gmail.com
###########################################

echo Instalando firebird 2.0.3

if [ "$(whoami)" != 'root' ]; then
  echo "Debe estar autenticado como root para ejecutar esta instalacion." 
  exit 1
else
  cd /root
  apt-get update
  apt-get install alien
  apt-get install libstdc++5
  wget http://ufpr.dl.sourceforge.net/sourceforge/firebird/FirebirdSS-2.0.3.12981-1.i686.rpm
  alien -d -c FirebirdSS-2.0.3.12981-1.i686.rpm
  dpkg -i firebirdss_2.0.3.12981-2_i386.deb
  cd /opt/firebird
  chmod 644 aliases.conf
  ln -s /opt/firebird/bin/isql /bin/isql-fb
  ln -s /opt/firebird/bin/gbak /bin/gbak
  ln -s /opt/firebird/bin/gfix /bin/gfix
  ln -s /opt/firebird/bin/gsec /bin/gsec
  cat /opt/firebird/SYSDBA.password
fi

