From 2e7ea91279765d43db72273c34d253c8039a91a8 Mon Sep 17 00:00:00 2001 From: dbs Date: Thu, 31 Jul 2008 13:10:18 +0000 Subject: [PATCH] Hush schema build messages that obscure potential real problems git-svn-id: svn://svn.open-ils.org/ILS/trunk@10216 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/build-db.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/sql/Pg/build-db.sh b/Open-ILS/src/sql/Pg/build-db.sh index 67c3b128cb..9ad12ee452 100755 --- a/Open-ILS/src/sql/Pg/build-db.sh +++ b/Open-ILS/src/sql/Pg/build-db.sh @@ -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 @@ for sql_file in $ordered_file_list; do # 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 <