Skip to content

Commit

Permalink
Bundle for version 2.1 created
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandstirnimann committed Sep 6, 2022
1 parent 8c4853a commit bc3c665
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0
2.1
15 changes: 14 additions & 1 deletion bundle/install_pgbasenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand Down Expand Up @@ -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
Expand Down
Binary file renamed bundle/pgbasenv-2.0.tar → bundle/pgbasenv-2.1.tar
Binary file not shown.

0 comments on commit bc3c665

Please sign in to comment.