diff mbox

Allow installation on CentOS

Message ID 1488872878-18137-2-git-send-email-geza.gemes@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gémes Géza March 7, 2017, 7:47 a.m. UTC
Add $DISTRO = "CentOS"
to the rpm installation targets
complementing Fedora

Signed-off-by: Géza Gémes <geza.gemes@gmail.com>
---
 lib/common-functions.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Stefano Stabellini March 7, 2017, 6:17 p.m. UTC | #1
On Tue, 7 Mar 2017, Géza Gémes wrote:
> Add $DISTRO = "CentOS"
> to the rpm installation targets
> complementing Fedora
> 
> Signed-off-by: Géza Gémes <geza.gemes@gmail.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

Thanks for the patch!

>  lib/common-functions.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/common-functions.sh b/lib/common-functions.sh
> index 19434c2..d4476f3 100644
> --- a/lib/common-functions.sh
> +++ b/lib/common-functions.sh
> @@ -420,7 +420,7 @@ function install_package() {
>      if [[ $DISTRO = "Debian" ]]
>      then
>          $SUDO dpkg -i "$1".deb
> -    elif [[  $DISTRO = "Fedora" ]]
> +    elif [[  $DISTRO = "Fedora" || $DISTRO = "CentOS" ]]
>      then
>          $SUDO rpm -i --force "$1"-`git show --oneline | head -1 | cut -d " " -f 1`-0.$RAISIN_ARCH.rpm
>      else
> @@ -432,7 +432,7 @@ function uninstall_package() {
>      if [[ $DISTRO = "Debian" ]]
>      then
>          $SUDO dpkg -r "$1"
> -    elif [[ $DISTRO = "Fedora" ]]
> +    elif [[ $DISTRO = "Fedora" || $DISTRO = "CentOS" ]]
>      then
>          $SUDO rpm -e "$1"
>      else
> -- 
> 2.7.4
>
diff mbox

Patch

diff --git a/lib/common-functions.sh b/lib/common-functions.sh
index 19434c2..d4476f3 100644
--- a/lib/common-functions.sh
+++ b/lib/common-functions.sh
@@ -420,7 +420,7 @@  function install_package() {
     if [[ $DISTRO = "Debian" ]]
     then
         $SUDO dpkg -i "$1".deb
-    elif [[  $DISTRO = "Fedora" ]]
+    elif [[  $DISTRO = "Fedora" || $DISTRO = "CentOS" ]]
     then
         $SUDO rpm -i --force "$1"-`git show --oneline | head -1 | cut -d " " -f 1`-0.$RAISIN_ARCH.rpm
     else
@@ -432,7 +432,7 @@  function uninstall_package() {
     if [[ $DISTRO = "Debian" ]]
     then
         $SUDO dpkg -r "$1"
-    elif [[ $DISTRO = "Fedora" ]]
+    elif [[ $DISTRO = "Fedora" || $DISTRO = "CentOS" ]]
     then
         $SUDO rpm -e "$1"
     else