Fix bugs introduced from merge with master. (refs #2221)
[arvados.git] / docker / build.sh
index add3194f52ab412dab965e621bdb24832ebec8f7..a6bb5b843ac55fe2a263aa82a53fd0d04cb1d798 100755 (executable)
@@ -1,9 +1,12 @@
 #! /bin/bash
 
 # make sure Ruby 1.9.3 is installed before proceeding
-if ! ruby -v 2>/dev/null | grep '1\.9\.3' > /dev/null
+if ! ruby -e 'exit RUBY_VERSION >= "1.9.3"' 2>/dev/null
 then
-    echo "Installing Ruby. You may be required to enter your password."
+    echo "Installing Arvados requires at least Ruby 1.9.3."
+    echo "You may need to enter your password."
+    read -p "Press Ctrl-C to abort, otherwise we will install ruby1.9.3 now..." unused
+    
     sudo apt-get update
     sudo apt-get -y install ruby1.9.3
 fi