From 852b80ac6f7444208fa99fb0eaefefb95bb2bf4b Mon Sep 17 00:00:00 2001 From: Gregory Brown Date: Wed, 26 Feb 2014 15:27:54 -0500 Subject: [PATCH] Improve checks in bin/setup --- bin/setup | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/setup b/bin/setup index da74e36..1660b7e 100755 --- a/bin/setup +++ b/bin/setup @@ -10,6 +10,10 @@ has_ruby() { command_exists "ruby" && ruby -v | grep -q "$1" } +has_qmake() { + command_exists "qmake" && qmake -v | grep -q "$1" +} + error_title() { echo "\033[31m == $1 ==\033[0m" } @@ -19,7 +23,7 @@ link() { } # Check for qmake -if ! command_exists "qmake"; then +if ! has_qmake "4.8"; then exec >&2 error_title "We use capybara-webkit for testing our app" echo "capybara-webkit depends on a WebKit implementation from Qt." @@ -42,7 +46,7 @@ if ! command_exists "psql"; then fi # Check Ruby 2.0 is installed. -if ! has_ruby "2.0"; then +if ! has_ruby "2.*"; then exec >&2 error_title "The application runs on Ruby 2.0" echo "In order to get the app running, you first need to install Ruby 2.0."