]> xenbits.xensource.com Git - raisin.git/commitdiff
Allow installation on CentOS
authorGéza Gémes <geza.gemes@gmail.com>
Tue, 7 Mar 2017 07:47:58 +0000 (08:47 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 7 Mar 2017 18:16:38 +0000 (10:16 -0800)
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>
lib/common-functions.sh

index 19434c2024741eca0208c13210dbd1bb7ee0c7ac..d4476f3d1b29ec16d21453c7f2f81b207bb48c5f 100644 (file)
@@ -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