package-helpers-cmxsl/helpers/DATA/postgresql-common/supported-versions-trisquel.patch

54 lines
1.5 KiB
Diff

diff --git a/debian/supported-versions b/tmp/supported-versions
index 9edb220..6d16f58 100755
--- a/debian/supported-versions
+++ b/debian/supported-versions
@@ -48,6 +48,9 @@ DEFAULT="16"
default() {
. /etc/os-release
case "$ID" in
+ [tT]risquel)
+ trisquel
+ ;;
[uU]buntu)
ubuntu
;;
@@ -56,7 +59,10 @@ default() {
;;
*)
echo "supported-versions: WARNING! Unknown distribution ID in /etc/os-release: $ID" >&2
- if echo $ID_LIKE | grep -E '(^| )ubuntu($| )' > /dev/null; then
+ if echo $ID_LIKE | grep -E '(^| )trisquel($| )' > /dev/null; then
+ echo "trisqueln found in ID_LIKE, treating as Trisquel" >&2
+ trisquel
+ elif echo $ID_LIKE | grep -E '(^| )ubuntu($| )' > /dev/null; then
echo "ubuntu found in ID_LIKE, treating as Ubuntu" >&2
ubuntu
elif echo $ID_LIKE | grep -E '(^| )debian($| )' > /dev/null; then
@@ -76,6 +76,27 @@ default() {
esac
}
+trisquel() {
+ case "$1" in
+ 10.0*) # Nabia
+ /bin/echo -e "12"
+ ;;
+ 11.0*) # Aramo
+ /bin/echo -e "14"
+ ;;
+ 12.0*) # Ecne
+ /bin/echo -e "16"
+ ;;
+ *)
+ echo "supported_versions: WARNING: Unknown Trisquel release: $1" >&2
+ /bin/echo -e "$DEFAULT"
+ ;;
+ esac
+}
+
+trisquel() {
+ echo "$DEFAULT"
+}
ubuntu() {
echo "$DEFAULT"
}