From e440e73a889c8929730632d62ebc84e32475b549 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Wed, 13 Jul 2011 11:03:13 +0200 Subject: Add PostgreSQL --- build/pgsql/configure | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 build/pgsql/configure (limited to 'build/pgsql/configure') diff --git a/build/pgsql/configure b/build/pgsql/configure new file mode 100755 index 0000000..11f419e --- /dev/null +++ b/build/pgsql/configure @@ -0,0 +1,58 @@ +#! /usr/bin/env bash + +# file : build/pgsql/configure +# author : Constantin Michael +# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +# +# dcf_root - dynamic configuration root +# + +$echo +$echo "Please enter the PostgreSQL client program path." +$echo + +driver=`read_path --command psql` + +$echo +$echo "Please enter the PostgreSQL database user. Note that the named" +$echo "user must be allowed to connect to the database server without" +$echo "specifying credentials." +$echo + +user=`read_value "odb_test"` + +$echo +$echo "Please enter the PostgreSQL database name. Note that it WILL BE" +$echo "MODIFIED by the tests." +$echo + +db=`read_value "odb_test"` + +$echo +$echo "Please enter the PostgreSQL database host. Leaving this field" +$echo "blank results in using Unix-domain socket. Machines without" +$echo "Unix-domain sockets will connect to localhost." + +host=`read_value ""` + +$echo +$echo "Please enter the PostgreSQL database port or the socket file name" +$echo "extension for Unix-domain connections." +$echo + +port=`read_value ""` + +opt=$dcf_root/db.options +drv=$dcf_root/db-driver + +echo "--user '$user'" >$opt +echo "--database '$db'" >>$opt +echo "--host '$host'" >>$opt +echo "--port '$port'" >>$opt + +echo "#!/bin/sh" >$drv +echo "opt=\`cat $opt\`" >>$drv +echo "eval $scf_root/pgsql/pgsql --driver $driver \$opt \$*" >>$drv +chmod 755 $drv -- cgit v1.1