#!/bin/sh -e # print a list of PostgreSQL versions that are supported for the platform this # script runs on. # # (C) 2005 Martin Pitt DEFAULT="8.3\n8.4" lsb_ubuntu() { case "$1" in 8.04 | 8.10 | 9.04) /bin/echo -e "8.3\n8.4" ;; 9.10|10.04) /bin/echo -e "8.4" ;; *) echo "supported_versions: WARNING: Unknown Ubuntu release: $1" >&2 /bin/echo -e "$DEFAULT" ;; esac } lsb_debian() { case "$1" in # Lenny 5.0*) /bin/echo -e "8.3\n8.4" ;; # unstable testing/unstable | testing | unstable) /bin/echo -e "8.3\n8.4" ;; *) echo "supported_versions: WARNING: Unknown Debian release: $1" >&2 /bin/echo -e "$DEFAULT" ;; esac } # If we have lsb_release, use it if type lsb_release >/dev/null 2>/dev/null; then DISTRO="`lsb_release -is`" RELEASE="`lsb_release -rs`" # Ubuntu? case "$DISTRO" in Ubuntu) lsb_ubuntu "$RELEASE" ;; Debian) lsb_debian "$RELEASE" ;; *) echo "supported_versions: WARNING! Unknown distribution: $DISTRO" >&2 echo "Please submit this as a bug report to your distribution." >&2 /bin/echo -e "$DEFAULT" ;; esac else # Debian? if [ -e /etc/debian_version ]; then /bin/echo -e "8.3\n8.4"; else echo "supported_versions: WARNING: Unknown distribution" >&2 /bin/echo -e "$DEFAULT" fi fi exit 0