22
33set -e # Exit on any error
44
5+ # Ensure non-interactive mode for apt
6+ export DEBIAN_FRONTEND=noninteractive
7+
58echo " Installing PostgreSQL client tools versions 13-17 for Linux (Debian/Ubuntu)..."
69echo
710
3033
3134# Add PostgreSQL official APT repository
3235echo " Adding PostgreSQL official APT repository..."
33- $SUDO apt-get update -qq
34- $SUDO apt-get install -y wget ca-certificates
36+ $SUDO apt-get update -qq -y
37+ $SUDO apt-get install -y -qq wget ca-certificates
3538
3639# Add GPG key
37- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | $SUDO apt-key add -
40+ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | $SUDO apt-key add - 2> /dev/null
3841
3942# Add repository
40- echo " deb http://apt.postgresql.org/pub/repos/apt/ $( lsb_release -cs) -pgdg main" | $SUDO tee /etc/apt/sources.list.d/pgdg.list
43+ echo " deb http://apt.postgresql.org/pub/repos/apt/ $( lsb_release -cs) -pgdg main" | $SUDO tee /etc/apt/sources.list.d/pgdg.list > /dev/null
4144
4245# Update package list
4346echo " Updating package list..."
44- $SUDO apt-get update -qq
47+ $SUDO apt-get update -qq -y
4548
4649# Install client tools for each version
4750versions=" 13 14 15 16 17"
@@ -50,7 +53,7 @@ for version in $versions; do
5053 echo " Installing PostgreSQL $version client tools..."
5154
5255 # Install client tools only
53- $SUDO apt-get install -y postgresql-client-$version
56+ $SUDO apt-get install -y -qq postgresql-client-$version
5457
5558 # Create version-specific directory and symlinks
5659 version_dir=" $POSTGRES_DIR /postgresql-$version "
0 commit comments