From 3b517d79d98caa0f4436ae30419ea9ca56a0efc2 Mon Sep 17 00:00:00 2001 From: ronivay Date: Mon, 3 May 2021 15:02:35 +0300 Subject: [PATCH] add checks based on osname AND osversion instead of only latter inside deb dependency installation --- xo-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xo-install.sh b/xo-install.sh index 176e02b..fb3c227 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -206,7 +206,7 @@ function InstallDependenciesDeb { # Install necessary dependencies for XO build - if [[ $OSVERSION =~ (16|18|20) ]]; then + if [[ $OSNAME == "Ubuntu" ]]; then echo printprog "OS Ubuntu so making sure universe repository is enabled" cmdlog "add-apt-repository universe" @@ -221,7 +221,7 @@ function InstallDependenciesDeb { printok "Running apt-get update" #determine which python package is needed. Ubuntu 20 requires python2-minimal, 16 and 18 are python-minimal - if [[ $OSVERSION == "20" ]]; then + if [[ $OSNAME == "Ubuntu" ]] && [[ $OSVERSION == "20" ]]; then PYTHON="python2-minimal" else PYTHON="python-minimal" @@ -241,7 +241,7 @@ function InstallDependenciesDeb { apt-get install -y apt-transport-https ca-certificates >>$LOGFILE 2>&1 printok "Installing apt-transport-https and ca-certificates packages to support https repos" - if [[ $OSVERSION == "10" ]]; then + if [[ $OSNAME == "Debian" ]] && [[ $OSVERSION == "10" ]]; then echo printprog "Debian 10, so installing gnupg also" cmdlog "apt-get install gnupg -y"