From: Ben Shum Date: Tue, 7 Nov 2017 18:41:56 +0000 (-0500) Subject: LP#1730721: future proof build-db.sh X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b59863ee1af8c67e1c16361113cdfa58f5d0b97b;p=Evergreen.git 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 --- 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 <