]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
bootstrap: apt/yum install the list of dependencies if missing
authorAndrew Schoen <aschoen@redhat.com>
Mon, 29 Jun 2015 18:24:05 +0000 (13:24 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Mon, 29 Jun 2015 22:29:34 +0000 (17:29 -0500)
Instead of just printing the list and bailing, assume the user has sudo
and actually install them.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
bootstrap

index 656c02035f8449afe8235b3cad34aa9936c40f80..871ac4ed038d887f783f1b6a727449371f00a347 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -23,9 +23,9 @@ Linux)
             fi
         done
         if [ -n "$missing" ]; then
-            echo "$0: missing required packages, please install them:" 1>&2
-            echo "sudo apt-get install $missing"
-            exit 1
+            echo "$0: missing required packages, installing them:" 1>&2
+            echo "$missing"
+            sudo apt-get -y install $missing
         fi
         ;;
     Fedora)
@@ -35,9 +35,9 @@ Linux)
            fi
        done
        if [ -n "$missing" ]; then
-            echo "$0: missing required packages, please install them:" 1>&2
-            echo "sudo yum install $missing"
-            exit 1
+            echo "$0: missing required packages, installing them:" 1>&2
+            echo "$missing"
+            sudo yum -y install $missing
        fi
        ;;
     "openSUSE project"|"SUSE LINUX")