1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-20 02:52:11 +00:00

Ubuntu 20.04 update version checks

This commit is contained in:
Daniel Mabbett 2020-04-24 13:35:39 +10:00
parent 40b21c466d
commit 1137bc471a
2 changed files with 19 additions and 9 deletions

View File

@ -18,11 +18,22 @@ if [ -z "$TAG" ]; then
# space, but if we put it in a comment it would confuse the status checks!) # space, but if we put it in a comment it would confuse the status checks!)
# to get the latest version, so the first such line must be the one that we # to get the latest version, so the first such line must be the one that we
# want to display in status checks. # want to display in status checks.
if [ "`lsb_release -d | sed 's/.*:\s*//' | sed 's/18\.04\.[0-9]/18.04/' `" == "Ubuntu 18.04 LTS" ]; then distribution=$( lsb_release --id --short )
release=$( lsb_release --release --short )
if [ "${distribution}" == "Ubuntu" ] && [ "${release}" == "20.04" ]; then
# This machine is running Ubuntu 20.04.
TAG=v0.50
elif [ "${distribution}" == "Ubuntu" ] && [ "${release}" == "18.04" ]; then
# This machine is running Ubuntu 18.04. # This machine is running Ubuntu 18.04.
echo "You are installing the last version of Mail-in-a-Box that will"
echo "support Ubuntu 18.04. If this is a new installation of Mail-in-a-Box,"
echo "stop now and switch to a machine running Ubuntu 20.04. If you are"
echo "upgrading an existing Mail-in-a-Box --- great. After upgrading this"
echo "box, please visit https://mailinabox.email for notes on how to upgrade"
echo "to Ubuntu 20.04."
echo ""
TAG=v0.44 TAG=v0.44
elif [ "${distribution}" == "Ubuntu" ] && [ "${release}" == "14.04" ]; then
elif [ "`lsb_release -d | sed 's/.*:\s*//' | sed 's/14\.04\.[0-9]/14.04/' `" == "Ubuntu 14.04 LTS" ]; then
# This machine is running Ubuntu 14.04. # This machine is running Ubuntu 14.04.
echo "You are installing the last version of Mail-in-a-Box that will" echo "You are installing the last version of Mail-in-a-Box that will"
echo "support Ubuntu 14.04. If this is a new installation of Mail-in-a-Box," echo "support Ubuntu 14.04. If this is a new installation of Mail-in-a-Box,"
@ -32,9 +43,8 @@ if [ -z "$TAG" ]; then
echo "to Ubuntu 18.04." echo "to Ubuntu 18.04."
echo "" echo ""
TAG=v0.30 TAG=v0.30
else else
echo "This script must be run on a system running Ubuntu 18.04 or Ubuntu 14.04." echo "This script must be run on a system running Ubuntu LTS versions 20.04, 18.04, or 14.04"
exit 1 exit 1
fi fi
fi fi

View File

@ -7,11 +7,11 @@ if [[ $EUID -ne 0 ]]; then
exit 1 exit 1
fi fi
# Check that we are running on Ubuntu 18.04 LTS (or 18.04.xx). # Check that we are running on Ubuntu 20.04 LTS (or 20.04.xx).
if [ "`lsb_release -d | sed 's/.*:\s*//' | sed 's/18\.04\.[0-9]/18.04/' `" != "Ubuntu 18.04 LTS" ]; then if [ "$( lsb_release --id --short )" != "Ubuntu" ] || [ "$( lsb_release --release --short )" != "20.04" ]; then
echo "Mail-in-a-Box only supports being installed on Ubuntu 18.04, sorry. You are running:" echo "Mail-in-a-Box only supports being installed on Ubuntu 20.04, sorry. You are running:"
echo echo
lsb_release -d | sed 's/.*:\s*//' lsb_release --description --short
echo echo
echo "We can't write scripts that run on every possible setup, sorry." echo "We can't write scripts that run on every possible setup, sorry."
exit 1 exit 1