From 2ba78dd2616596d7ace0870b033ed77a688d96ab Mon Sep 17 00:00:00 2001 From: gau1991 Date: Tue, 2 Sep 2014 20:10:11 +0530 Subject: [PATCH] Better way to handle Debian COdename --- src/lib/ee_lib_variables.sh | 2 +- src/modules/stack/install/ee_mod_repo_php.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/ee_lib_variables.sh b/src/lib/ee_lib_variables.sh index 65e84076..c5b2113e 100644 --- a/src/lib/ee_lib_variables.sh +++ b/src/lib/ee_lib_variables.sh @@ -32,7 +32,7 @@ elif [ "$EE_LINUX_DISTRO" == "Debian" ]; then # Specify nginx package readonly EE_NGINX_PACKAGE=nginx-full # Detect Debian version - readonly EE_DEBIAN_VERSION=$(lsb_release -r | awk '{print($2)}' | cut -d'.' -f1) + readonly EE_DEBIAN_VERSION=$(lsb_release -sc) fi # Find php user-name diff --git a/src/modules/stack/install/ee_mod_repo_php.sh b/src/modules/stack/install/ee_mod_repo_php.sh index e21bb382..2e1015a5 100644 --- a/src/modules/stack/install/ee_mod_repo_php.sh +++ b/src/modules/stack/install/ee_mod_repo_php.sh @@ -11,7 +11,7 @@ function ee_mod_repo_php() || ee_lib_error "Unable to add ondrej php5 launchpad repository, exit status = " $? # Debian 6 - elif [ $EE_DEBIAN_VERSION -eq 6 ]; then + elif [ "$EE_DEBIAN_VERSION" == "squeeze" ]; then ee_lib_echo "Adding Dotdeb PHP5.4 repository, please wait..." echo "deb http://packages.dotdeb.org $(lsb_release -sc)-php54 all" > /etc/apt/sources.list.d/dotdeb-$(lsb_release -sc)-php54.list \ @@ -21,7 +21,7 @@ function ee_mod_repo_php() ee_lib_dotdeb # Debian 7 - elif [ $EE_DEBIAN_VERSION -eq 7 ]; then + elif [ "$EE_DEBIAN_VERSION" == "wheezy" ]; then ee_lib_echo "Adding Dotdeb PHP5.5 repository, please wait..." echo "deb http://packages.dotdeb.org $(lsb_release -sc)-php55 all" > /etc/apt/sources.list.d/dotdeb-$(lsb_release -sc)-php55.list \