From 12a4783a98ba0ea9189d248062fe892d407ff28d Mon Sep 17 00:00:00 2001 From: Dylan Weremeichik Date: Fri, 15 Sep 2017 17:58:35 -0400 Subject: [PATCH] [PPA] Fixes issue where some Ubuntu derivatives would not add the appropriate PPA. --- app/build/resources/linux/debian/postinst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/build/resources/linux/debian/postinst b/app/build/resources/linux/debian/postinst index 3d885b249..0bd6db615 100755 --- a/app/build/resources/linux/debian/postinst +++ b/app/build/resources/linux/debian/postinst @@ -23,15 +23,16 @@ case "$1" in gtk-update-icon-cache /usr/share/icons/hicolor > /dev/null 2>&1 DISTRO=`lsb_release -s -i` + DISTRO_UPSTREAM=`lsb_release -s -i -u` - if [ "$DISTRO" = "Ubuntu" ] || [ "$DISTRO" = "elementary OS" ] || [ "$DISTRO" = "LinuxMint" ] ; then + if [ "$DISTRO" = "Ubuntu" ] || [ "$DISTRO_UPSTREAM" = "Ubuntu" ]; then DISTS=$UBUNTU_CODENAMES DISTRO="ubuntu" elif [ "$DISTRO" = "Debian" ]; then DISTS=$DEBIAN_CODENAMES DISTRO="debian" else - echo "You are not running Debian, Ubuntu, ElementaryOS or LinuxMint. Not adding mailspring repository." + echo "You are not running Debian, Ubuntu, or an Ubuntu derivative. Not adding mailspring repository." DISTRO="" fi @@ -84,10 +85,11 @@ KEYDATA } DISTRIB_CODENAME=`lsb_release -s -c` + DISTRIB_UPSTREAM_CODENAME=`lsb_release -s -c -u` for DIST in $DISTS; do REPO=$DIST - if [ "$DIST" = "$DISTRIB_CODENAME" ]; then + if [ "$DIST" = "$DISTRIB_CODENAME" ] || [ "$DIST" = "$DISTRIB_UPSTREAM_CODENAME" ]; then break fi done