From aec225a72080dad0942096f3546b3077ca5b428f Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Thu, 14 Jul 2011 16:57:04 +0200 Subject: Do not output empty PostgreSQL client configuration options --- build/pgsql/configure | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) 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