]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
build/ops: run-make-check.sh: fix SUSE support 20737/head
authorNathan Cutler <ncutler@suse.com>
Thu, 1 Feb 2018 14:53:15 +0000 (15:53 +0100)
committerPrashant D <pdhange@redhat.com>
Tue, 6 Mar 2018 05:35:38 +0000 (00:35 -0500)
Get /usr/bin/which from the right RPM.

Fixes: http://tracker.ceph.com/issues/22875
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit 5200405bf031146ceaebf8b347a1b590c06621ba)

run-make-check.sh

index aa8f8ed28f82b28a5230d2354ef3b52bea935eeb..078345422763426fd479e85cde219d242de3242f 100755 (executable)
@@ -30,8 +30,8 @@ function get_processors() {
 function run() {
     local install_cmd
     local which_pkg="which"
+    source /etc/os-release
     if test -f /etc/redhat-release ; then
-        source /etc/os-release
         if ! type bc > /dev/null 2>&1 ; then
             echo "Please install bc and re-run." 
             exit 1
@@ -41,13 +41,13 @@ function run() {
         else
             install_cmd="yum install -y"
         fi
-    else
+    elif type zypper > /dev/null 2>&1 ; then
+        install_cmd="zypper --gpg-auto-import-keys --non-interactive install --no-recommends"
+    elif type apt-get > /dev/null 2>&1 ; then
+        install_cmd="apt-get install -y"
         which_pkg="debianutils"
     fi
 
-    type apt-get > /dev/null 2>&1 && install_cmd="apt-get install -y"
-    type zypper > /dev/null 2>&1 && install_cmd="zypper --gpg-auto-import-keys --non-interactive install"
-
     if ! type sudo > /dev/null 2>&1 ; then
         echo "Please install sudo and re-run. This script assumes it is running"
         echo "as a normal user with the ability to run commands as root via sudo." 
@@ -57,6 +57,7 @@ function run() {
         $DRY_RUN sudo $install_cmd ccache jq $which_pkg
     else
         echo "WARNING: Don't know how to install packages" >&2
+        echo "This probably means distribution $ID is not supported by run-make-check.sh" >&2
     fi
 
     if test -f ./install-deps.sh ; then