#!/usr/bin/perl 
# $Id$
# This script module is maintained by Rdiger Beck
# It is Free Software (License GPLv3)
# If you find errors, contact the author
# jeffbeck@web.de  or  jeffbeck@gmx.de




############################################################
# This script is NOT USED ANYMORE
############################################################



# This Script replaces @@tag@@ tags in sophomorix.sql.template
# BEFORE packaging takes places
use strict;

my $replace="";

my $dbname="ldap";
my $dbuser="sophomorix";


# the great replacement string
$replace= " -e 's/\@\@dbname\@\@/${dbname}/g'". 
          " -e 's/\@\@dbuser\@\@/${dbuser}/g'"; 

my $template="./sophomorix-pgldap/config-pg/sophomorix.sql.template";
my $generated="./sophomorix-pgldap/config-pg/sophomorix.sql.generated";

# the great replacement string
$replace= " -e 's/\@\@dbname\@\@/${dbname}/g'". 
          " -e 's/\@\@dbuser\@\@/${dbuser}/g'"; 


# do it
system("sed $replace $template > $generated"); 

