diff --git a/bin/VERSION b/bin/VERSION index cd5ac03..879b416 100644 --- a/bin/VERSION +++ b/bin/VERSION @@ -1 +1 @@ -2.0 +2.1 diff --git a/bundle/install_pgbasenv.sh b/bundle/install_pgbasenv.sh index 33082a0..496d04b 100755 --- a/bundle/install_pgbasenv.sh +++ b/bundle/install_pgbasenv.sh @@ -68,6 +68,19 @@ if [[ $? -gt 0 ]]; then fi fi +# Check if md5sum is installed, required by scriptmgr.sh +command -v md5sum > /dev/null +if [[ $? -gt 0 ]]; then + if [[ -z $SILENT ]]; then + read -p "Cannot find md5sum command. It is required to correctly execute scriptmgr.sh used in .psqlrc. Ignore Y or N [N]: " IGNORE_MD5SUM + IGNORE_MD5SUM=${IGNORE_MD5SUM:-N} + [[ "$IGNORE_MD5SUM" == "N" ]] && exit 0 + else + echo "ERROR: Cannot find md5sum command. It is required to correctly execute scriptmgr.sh used in .psqlrc." + exit 1 + fi +fi + TARFILE=$(ls -1 pgbasenv-*.tar 2>/dev/null | sort -n -t"-" -k2 | tail -1) if [[ -z $TARFILE ]]; then echo "ERROR: Tar file pgbasenv-(VERSION).tar do not found in current directory!" @@ -204,7 +217,7 @@ fi echo "-- PGBASENV BEGIN ---------------------------------" >> ~/.psqlrc echo "\set pgbasenv_base \`echo \"$PGBASENV_BASE\"\`" >> ~/.psqlrc echo "\! $PGBASENV_BASE/bin/scriptmgr.sh prep" >> ~/.psqlrc -echo "select substring(''||:VERSION_NAME, 1, position('.' in ''||:VERSION_NAME)-1) as pgreleasenum" >> ~/.psqlrc +echo "select substring(''||:'VERSION_NAME', 1, position('.' in ''||:'VERSION_NAME')-1) as pgreleasenum" >> ~/.psqlrc echo "\gset" >> ~/.psqlrc echo "\i :pgbasenv_base/scripts/.run.:pgreleasenum" >> ~/.psqlrc echo "-- PGBASENV END -----------------------------------" >> ~/.psqlrc diff --git a/bundle/pgbasenv-2.0.tar b/bundle/pgbasenv-2.1.tar similarity index 88% rename from bundle/pgbasenv-2.0.tar rename to bundle/pgbasenv-2.1.tar index 7c2e9c4..5ab5bee 100644 Binary files a/bundle/pgbasenv-2.0.tar and b/bundle/pgbasenv-2.1.tar differ