Merge of pull request #19 - Detect Ubuntu release after (and including) 16.04 LTS

pull/334/head
romeo-golf 2017-02-08 18:36:05 +00:00
rodzic b322338493
commit a7b4333fc8
1 zmienionych plików z 16 dodań i 24 usunięć

Wyświetl plik

@ -243,15 +243,15 @@ CheckPackage rrdtool
# Portal dependencies.
CheckPackage libpython2.7
# Check if this is Ubuntu 16.04 LTS (or later)
# Since Ubuntu versions are always in the format yy.mm, we can simply
# remove the decimal and treat the resultant string as an integer
if [ -f /etc/lsb-release ]; then
. /etc/lsb-release
temp=$(echo $DISTRIB_RELEASE | sed "s/\.//g")
if [ $DISTRIB_ID == "Ubuntu" ] && [ $temp -ge 1604 ]; then
# Check if this is Ubuntu 16.04 LTS (or later).
# Note Ubuntu versions should always be in the format yy.mm format...
# So we can simply remove the decimal and treat the resultant string as an integer.
if [[ -s "/etc/lsb-release" ]] ; then
source /etc/lsb-release
if [[ "${DISTRIB_ID}" = "Ubuntu" ]] && [[ "$(echo ${DISTRIB_RELEASE} | tr -cd '[:digit:]')" -ge "1604" ]] ; then
CheckPackage php7.0-cgi
CheckPackage php7.0-json # was php7.0-xml - maybe a typo?
# Note the line below was previously 'CheckPackage php7.0-xml' but is suspected of being a typo.. TBC
CheckPackage php7.0-json
else
CheckPackage php5-cgi
CheckPackage php5-json
@ -268,14 +268,10 @@ if [ $ADVANCED = TRUE ]; then
"MySQL")
CheckPackage mysql-client
CheckPackage python-mysqldb
# Check if this is Ubuntu 16.04 LTS (or later)
# Since Ubuntu versions are always in the format yy.mm we can simply
# remove the decimal and treat the resultant string as an integer
if [ -f /etc/lsb-release ]; then
. /etc/lsb-release
temp=$(echo $DISTRIB_RELEASE | sed "s/\.//g")
if [ $DISTRIB_ID == "Ubuntu" ] && [ $temp -ge 1604 ]; then
# Check if this is Ubuntu 16.04 LTS (or later).
if [[ -s "/etc/lsb-release" ]] ; then
source /etc/lsb-release
if [[ "${DISTRIB_ID}" = "Ubuntu" ]] && [[ "$(echo ${DISTRIB_RELEASE} | tr -cd '[:digit:]')" -ge "1604" ]] ; then
CheckPackage php7.0-mysql
else
CheckPackage php5-mysql
@ -286,14 +282,10 @@ if [ $ADVANCED = TRUE ]; then
;;
"SQLite")
CheckPackage sqlite3
# Check if this is Ubuntu 16.04 LTS (or later)
# Since Ubuntu versions are always in the format yy.mm we can simply
# remove the decimal and treat the resultant string as an integer
if [ -f /etc/lsb-release ]; then
. /etc/lsb-release
temp=$(echo $DISTRIB_RELEASE | sed "s/\.//g")
if [ $DISTRIB_ID == "Ubuntu" ] && [ $temp -ge 1604 ]; then
# Check if this is Ubuntu 16.04 LTS (or later).
if [[ -s "/etc/lsb-release" ]] ; then
source /etc/lsb-release
if [[ "${DISTRIB_ID}" = "Ubuntu" ]] && [[ "$(echo ${DISTRIB_RELEASE} | tr -cd '[:digit:]')" -ge "1604" ]] ; then
CheckPackage php7.0-sqlite
else
CheckPackage php5-sqlite