diff postgres/setupExtensions.sh @ 81:53671513b240

DEP-10: add timezone and locale settings. add java base image. add native APR for tomcat
author smith@nwoca.org
date Mon, 11 Apr 2016 17:46:42 -0400
parents 5c093612ce89
children
line wrap: on
line diff
--- a/postgres/setupExtensions.sh	Fri Apr 08 21:40:03 2016 +0100
+++ b/postgres/setupExtensions.sh	Mon Apr 11 17:46:42 2016 -0400
@@ -1,11 +1,12 @@
 #!/bin/bash
 
 export PGUSER=postgres
-TEST=`psql <<- EOSQL
+result=`psql -t -A <<- EOSQL
    SELECT 1 FROM pg_database WHERE datname='$DB_NAME';
 EOSQL`
 
-if [[ $TEST == "1" ]]; then
+echo "Checking extensions on $DB_NAME ( $result )"
+if [[ $result == "1" ]]; then
     psql $DB_NAME <<- EOSQL
     CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
 EOSQL