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."