We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fca2dee + f9a89f0 commit 44101dbCopy full SHA for 44101db
1 file changed
runtime/functions
@@ -1,5 +1,6 @@
1
#!/bin/bash
2
set -e
3
+shopt -s extglob
4
source ${PG_APP_HOME}/env-defaults
5
6
PG_CONF=${PG_DATADIR}/postgresql.conf
@@ -185,7 +186,7 @@ initialize_database() {
185
186
;;
187
*)
188
echo "Initializing database..."
- PG_OLD_VERSION=$(find ${PG_HOME}/[0-9].[0-9]/main -maxdepth 1 -name PG_VERSION 2>/dev/null | grep -v $PG_VERSION | sort -r | head -n1 | cut -d'/' -f5)
189
+ PG_OLD_VERSION=$(find ${PG_HOME}/+([0-9])?(.[0-9])/main -maxdepth 1 -name PG_VERSION 2>/dev/null | grep -v $PG_VERSION | sort -r | head -n1 | cut -d'/' -f5)
190
if [[ -n ${PG_OLD_VERSION} ]]; then
191
echo "‣ Migrating PostgreSQL ${PG_OLD_VERSION} data to ${PG_VERSION}..."
192
0 commit comments