1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
#!/bin/sh -e
# print a list of PostgreSQL versions that are supported for the platform this
# script runs on.
#
# (C) 2005 Martin Pitt <mpitt@debian.org>
DEFAULT="8.1\n8.2"
lsb_ubuntu() {
case "$1" in
5.10)
/bin/echo -e "7.4\n8.0\n8.1"
;;
6.06 | 6.06LTS | 6.10)
/bin/echo -e "$DEFAULT"
;;
7.04)
/bin/echo -e "8.2"
;;
*)
echo "supported_versions: WARNING: Unknown Ubuntu release: $1" >&2
/bin/echo -e "$DEFAULT"
;;
esac
}
lsb_debian() {
case "$1" in
testing/unstable | testing | unstable | 3.1 | 4.0)
/bin/echo -e "7.4\n8.1\n8.2"
;;
*)
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 "8.1\n8.2"
;;
esac
else
# Debian?
if [ -e /etc/debian_version ]; then
echo -e "7.4\n8.1\n8.2";
else
exit 1
fi
fi
exit 0
|