aboutsummaryrefslogtreecommitdiff
path: root/build/pgsql
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-07-14 16:57:04 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-07-14 16:57:04 +0200
commitaec225a72080dad0942096f3546b3077ca5b428f (patch)
tree4f90795f5985e2961d93d58c41a8655a8b0790a0 /build/pgsql
parentabd136caee7de39b6b6a5e38c48febc50a25dd1f (diff)
Do not output empty PostgreSQL client configuration options
Diffstat (limited to 'build/pgsql')
-rwxr-xr-xbuild/pgsql/configure19
1 files 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