[open-ils-commits] r10216 - trunk/Open-ILS/src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jul 31 09:10:24 EDT 2008
Author: dbs
Date: 2008-07-31 09:10:18 -0400 (Thu, 31 Jul 2008)
New Revision: 10216
Modified:
trunk/Open-ILS/src/sql/Pg/build-db.sh
Log:
Hush schema build messages that obscure potential real problems
Modified: trunk/Open-ILS/src/sql/Pg/build-db.sh
===================================================================
--- trunk/Open-ILS/src/sql/Pg/build-db.sh 2008-07-31 05:46:01 UTC (rev 10215)
+++ trunk/Open-ILS/src/sql/Pg/build-db.sh 2008-07-31 13:10:18 UTC (rev 10216)
@@ -2,13 +2,14 @@
# ---------------------------------------------------------------------------
# Store command line args for later use
-# args: {db-host} {db-port} {db-name} {db-user} {db-password}
+# args: {db-host} {db-port} {db-name} {db-user} {db-password} {verbose}
# ---------------------------------------------------------------------------
PGHOST=$1
PGPORT=$2
PGDATABASE=$3
PGUSER=$4
PGPASSWORD=$5
+VERBOSE=$6
export PGHOST PGPORT PGDATABASE PGUSER PGPASSWORD
# ---------------------------------------------------------------------------
@@ -128,7 +129,12 @@
# export ON_ERROR_STOP=1
export PGHOST PGPORT PGDATABASE PGUSER PGPASSWORD
- psql -f $sql_file
+ # Hide most of the harmless messages that obscure real problems
+ if [ -z "$VERBOSE" ]; then
+ psql -f $sql_file 2>&1 | grep -v NOTICE | grep -v "^INSERT"
+ else
+ psql -f $sql_file
+ fi
if [ $? != 0 ]; then
cat <<EOM
********************************************************************************
More information about the open-ils-commits
mailing list