From 65482585a1cb714bb90592b5aecc31e3fe260e43 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Thu, 14 Jul 2011 13:38:50 +0200 Subject: Do not output empty PostgreSQL client configuration options --- build/pgsql/configure | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'build/pgsql/configure') diff --git a/build/pgsql/configure b/build/pgsql/configure index 11f419e..7eeadc9 100755 --- a/build/pgsql/configure +++ b/build/pgsql/configure @@ -31,9 +31,8 @@ $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." +$echo "Please enter the PostgreSQL database host." +$echo host=`read_value ""` @@ -47,10 +46,16 @@ 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 "--user '$user'" >$opt +echo "--database '$db'" >>$opt + +if [ -n "$host"]; then +echo "--host '$host'" >>$opt +fi + +if [ -n "$port"]; then +echo "--port '$port'" >>$opt +fi echo "#!/bin/sh" >$drv echo "opt=\`cat $opt\`" >>$drv -- cgit v1.1