From b59863ee1af8c67e1c16361113cdfa58f5d0b97b Mon Sep 17 00:00:00 2001 From: Ben Shum Date: Tue, 7 Nov 2017 13:41:56 -0500 Subject: [PATCH] LP#1730721: future proof build-db.sh Use the same logic we've got in eg_db_config for build-db.sh to determine PostgreSQL version installed on server. Signed-off-by: Ben Shum Signed-off-by: Jason Stephenson --- Open-ILS/src/sql/Pg/build-db.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/sql/Pg/build-db.sh b/Open-ILS/src/sql/Pg/build-db.sh index 2b3540ca09..4eb7be0eae 100755 --- a/Open-ILS/src/sql/Pg/build-db.sh +++ b/Open-ILS/src/sql/Pg/build-db.sh @@ -15,7 +15,7 @@ export PGHOST PGPORT PGDATABASE PGUSER PGPASSWORD # --------------------------------------------------------------------------- # Lookup the database version from the PostgreSQL server. # --------------------------------------------------------------------------- -DB_VERSION=`psql -qtc 'show server_version;' | xargs | cut -c1,3` +DB_VERSION=`psql -qtc 'show server_version;' | xargs | cut -d. -f 1,2 | tr -d '.'` if [ -z "$DB_VERSION" ] || [ `echo $DB_VERSION | grep -c '[^0-9]'` != 0 ]; then cat <