From 63a0f7adb88fc67be7024dcbe890dc62bc473e28 Mon Sep 17 00:00:00 2001 From: Kunal Dabir Date: Wed, 5 Mar 2014 03:46:26 +0530 Subject: [PATCH] initial commit --- README.md | 87 +++++++++++++++++++++++++++++- bin/all/dq.sh | 117 ++++++++++++++++++++++++++++++++++++++++ bin/clojure_dev/dq.sh | 26 +++++++++ bin/core/dq.sh | 38 +++++++++++++ bin/db/dq.sh | 28 ++++++++++ bin/frontend_dev/dq.sh | 17 ++++++ bin/groovy_dev/dq.sh | 27 ++++++++++ bin/java_dev/dq.sh | 30 +++++++++++ bin/ruby_dev/dq.sh | 31 +++++++++++ bin/scala_dev/dq.sh | 37 +++++++++++++ build.rb | 30 +++++++++++ build.sh | 10 ++++ include/report.sh | 3 ++ include/setup.sh | 12 +++++ lib/clojure/clj.sh | 3 ++ lib/clojure/emacs.sh | 2 + lib/clojure/lein.sh | 2 + lib/core/curl.sh | 2 + lib/core/git.sh | 2 + lib/core/java.sh | 2 + lib/core/node.sh | 2 + lib/core/perl.sh | 2 + lib/core/python.sh | 2 + lib/core/ruby.sh | 2 + lib/core/vi.sh | 2 + lib/db/mongo.sh | 2 + lib/db/mongod.sh | 2 + lib/db/mysql.sh | 2 + lib/db/psql.sh | 2 + lib/frontend/bower.sh | 2 + lib/frontend/coffee.sh | 2 + lib/frontend/grunt.sh | 2 + lib/frontend/npm.sh | 2 + lib/frontend/sass.sh | 2 + lib/frontend/yo.sh | 2 + lib/groovy/groovy.sh | 2 + lib/groovy/groovyc.sh | 2 + lib/groovy/lazybones.sh | 2 + lib/java/ant.sh | 2 + lib/java/gradle.sh | 2 + lib/java/javac.sh | 4 ++ lib/java/mvn.sh | 2 + lib/ruby/bundle.sh | 2 + lib/ruby/gem.sh | 2 + lib/ruby/rake.sh | 2 + lib/ruby/rvm.sh | 2 + lib/scala/sbt.sh | 3 ++ lib/scala/scala.sh | 10 ++++ lib/scala/scalac.sh | 2 + urls.rb | 4 ++ 50 files changed, 577 insertions(+), 2 deletions(-) create mode 100644 bin/all/dq.sh create mode 100644 bin/clojure_dev/dq.sh create mode 100644 bin/core/dq.sh create mode 100644 bin/db/dq.sh create mode 100644 bin/frontend_dev/dq.sh create mode 100644 bin/groovy_dev/dq.sh create mode 100644 bin/java_dev/dq.sh create mode 100644 bin/ruby_dev/dq.sh create mode 100644 bin/scala_dev/dq.sh create mode 100644 build.rb create mode 100755 build.sh create mode 100644 include/report.sh create mode 100644 include/setup.sh create mode 100644 lib/clojure/clj.sh create mode 100644 lib/clojure/emacs.sh create mode 100644 lib/clojure/lein.sh create mode 100644 lib/core/curl.sh create mode 100644 lib/core/git.sh create mode 100644 lib/core/java.sh create mode 100644 lib/core/node.sh create mode 100644 lib/core/perl.sh create mode 100644 lib/core/python.sh create mode 100644 lib/core/ruby.sh create mode 100644 lib/core/vi.sh create mode 100644 lib/db/mongo.sh create mode 100644 lib/db/mongod.sh create mode 100644 lib/db/mysql.sh create mode 100644 lib/db/psql.sh create mode 100644 lib/frontend/bower.sh create mode 100644 lib/frontend/coffee.sh create mode 100644 lib/frontend/grunt.sh create mode 100644 lib/frontend/npm.sh create mode 100644 lib/frontend/sass.sh create mode 100644 lib/frontend/yo.sh create mode 100644 lib/groovy/groovy.sh create mode 100644 lib/groovy/groovyc.sh create mode 100644 lib/groovy/lazybones.sh create mode 100644 lib/java/ant.sh create mode 100644 lib/java/gradle.sh create mode 100644 lib/java/javac.sh create mode 100644 lib/java/mvn.sh create mode 100644 lib/ruby/bundle.sh create mode 100644 lib/ruby/gem.sh create mode 100644 lib/ruby/rake.sh create mode 100644 lib/ruby/rvm.sh create mode 100644 lib/scala/sbt.sh create mode 100644 lib/scala/scala.sh create mode 100644 lib/scala/scalac.sh create mode 100644 urls.rb diff --git a/README.md b/README.md index d1cd994..5db99a8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,85 @@ -dq -== +# dq + +Check how developer friendly your machine is! + +`curl -sL https://raw.github.com/kdabir/dq/master/bin/core/dq.sh | sh` + +This should produce output like : + +``` +✔ curl +✔ git +✔ java +✔ node +✔ perl +✔ python +✔ ruby +✔ vi +Your dq is 8 / 8 +``` + +There is more to it. Depending on what you develop, we have got some preselected profiles: + +#### Minimal +To see if you have some common commands installed that a developer machine usually needs +`curl -sL https://raw.github.com/kdabir/dq/master/bin/core/dq.sh | sh` + +#### ruby dev +`curl -sL https://raw.github.com/kdabir/dq/master/bin/ruby_dev/dq.sh | sh` + +#### frontend dev +`curl -sL https://raw.github.com/kdabir/dq/master/bin/frontend_dev/dq.sh | sh` + +#### java dev +`curl -sL https://raw.github.com/kdabir/dq/master/bin/java_dev/dq.sh | sh` + +#### clojure dev +`curl -sL https://raw.github.com/kdabir/dq/master/bin/clojure_dev/dq.sh | sh` + +#### groovy dev +`curl -sL https://raw.github.com/kdabir/dq/master/bin/groovy_dev/dq.sh | sh` + +#### scala dev +`curl -sL https://raw.github.com/kdabir/dq/master/bin/scala_dev/dq.sh | sh` + +#### db +`curl -sL https://raw.github.com/kdabir/dq/master/bin/db/dq.sh | sh` + +#### all + +**Feeling courageous**, see what all you have got : + +`curl -sL https://raw.github.com/kdabir/dq/master/bin/all/dq.sh | sh` + +This checks 35 commands on your box + +## Rolling out your own + +Checkout the repo, and from the root: + +`ruby build.rb ... | sh` + +e.g. `ruby build.rb ruby_dev frontend | sh` + + +## About + +Ever got onto a new machine or a remote server ? If you develop, you almost certainly need to check availability of your +tool-chain on command line. DQ is intended to relieve you from pain of checking each command individually. + +It was named DQ as Developer Quotient (or Developer Friendliness Quotient of a machine), which may not be the most +apt name but that was the best name I could think of. + +## Contributing + +Please submit more command checks, it's very easy to do so. Fork the repo and send PR. +Issues and feedback welcomed. + +## Paranoid ? + +Don't want to run `curl` piping to `sh`. Understandably, you might be concerned. Worry not. +- The source is hosted and is served directly from github, no app server in the middle. +- If you still want to check, do a `curl -sL https://raw.github.com/kdabir/dq/master/bin/core/dq.sh | cat` first. + (basically, replacing `sh` with `cat`, to see the content of the file ) + +### ♥ diff --git a/bin/all/dq.sh b/bin/all/dq.sh new file mode 100644 index 0000000..8f4daa6 --- /dev/null +++ b/bin/all/dq.sh @@ -0,0 +1,117 @@ +OK=0 +KO=0 + +_dq_report () { + if [ "$2" -eq 0 ]; then + echo "✔ $1" + OK=$(($OK+1)) + else + echo "✘ $1" + KO=$(($KO+1)) + fi +} + +ant -version > /dev/null 2>&1 +_dq_report 'ant' $? +bower --version > /dev/null 2>&1 +_dq_report 'bower' $? +bundle -v > /dev/null 2>&1 +_dq_report 'bundler' $? + +## surprisingly no option for version that i could find of +clj --help > /dev/null 2>&1 +_dq_report 'clojure' $? +coffee --version > /dev/null 2>&1 +_dq_report 'coffee' $? +curl --version > /dev/null 2>&1 +_dq_report 'curl' $? + +emacs --version > /dev/null 2>&1 +_dq_report 'emacs' $? +gem -v > /dev/null 2>&1 +_dq_report 'gem' $? + +git --version > /dev/null 2>&1 +_dq_report 'git' $? + +gradle -v > /dev/null 2>&1 +_dq_report 'gradle' $? +groovy --version > /dev/null 2>&1 +_dq_report 'groovy' $? +groovyc -version > /dev/null 2>&1 +_dq_report 'groovyc' $? +grunt --version > /dev/null 2>&1 +_dq_report 'grunt' $? +java -version > /dev/null 2>&1 +_dq_report 'java' $? + +# http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4380614 +# jdk +javac -version > /dev/null 2>&1 +_dq_report 'javac' $? + +lazybones --version > /dev/null 2>&1 +_dq_report 'lazybones' $? +lein -v > /dev/null 2>&1 +_dq_report 'leiningen' $? +mongo --version > /dev/null 2>&1 +_dq_report 'mongo client' $? + +mongod --version > /dev/null 2>&1 +_dq_report 'mongo server' $? + +mvn -v > /dev/null 2>&1 +_dq_report 'maven' $? +mysql --version > /dev/null 2>&1 +_dq_report 'mysql client' $? + +node --version > /dev/null 2>&1 +_dq_report 'node' $? + +npm --version > /dev/null 2>&1 +_dq_report 'npm' $? +perl -v > /dev/null 2>&1 +_dq_report 'perl' $? + +psql --version > /dev/null 2>&1 +_dq_report 'postgres client' $? + +python --version > /dev/null 2>&1 +_dq_report 'python' $? +rake -V > /dev/null 2>&1 +_dq_report 'rake' $? + +ruby -v > /dev/null 2>&1 +_dq_report 'ruby' $? + +rvm -v > /dev/null 2>&1 +_dq_report 'rvm' $? + +sass --version > /dev/null 2>&1 +_dq_report 'sass' $? +# this guy downloads the entire internet before telling its version +sbt sbt-version > /dev/null 2>&1 +_dq_report 'sbt' $? + +scala -version > /dev/null 2>&1 + +# this guy has its own idea of exit codes, fix it! +if [ $? -eq 1 ]; then + STATUS=0 +else + STATUS=1 +fi + +_dq_report 'scala' $STATUS + +scalac -version > /dev/null 2>&1 +_dq_report 'scalac' $? + +vi --version > /dev/null 2>&1 +_dq_report 'vi' $? +yo --version > /dev/null 2>&1 +_dq_report 'yoeman' $? + +echo Your dq is $OK / $(($OK+$KO)) + +exit $KO diff --git a/bin/clojure_dev/dq.sh b/bin/clojure_dev/dq.sh new file mode 100644 index 0000000..fc2d5db --- /dev/null +++ b/bin/clojure_dev/dq.sh @@ -0,0 +1,26 @@ +OK=0 +KO=0 + +_dq_report () { + if [ "$2" -eq 0 ]; then + echo "✔ $1" + OK=$(($OK+1)) + else + echo "✘ $1" + KO=$(($KO+1)) + fi +} + +## surprisingly no option for version that i could find of +clj --help > /dev/null 2>&1 +_dq_report 'clojure' $? +emacs --version > /dev/null 2>&1 +_dq_report 'emacs' $? +java -version > /dev/null 2>&1 +_dq_report 'java' $? + +lein -v > /dev/null 2>&1 +_dq_report 'leiningen' $? +echo Your dq is $OK / $(($OK+$KO)) + +exit $KO diff --git a/bin/core/dq.sh b/bin/core/dq.sh new file mode 100644 index 0000000..32927b3 --- /dev/null +++ b/bin/core/dq.sh @@ -0,0 +1,38 @@ +OK=0 +KO=0 + +_dq_report () { + if [ "$2" -eq 0 ]; then + echo "✔ $1" + OK=$(($OK+1)) + else + echo "✘ $1" + KO=$(($KO+1)) + fi +} + +curl --version > /dev/null 2>&1 +_dq_report 'curl' $? + +git --version > /dev/null 2>&1 +_dq_report 'git' $? + +java -version > /dev/null 2>&1 +_dq_report 'java' $? + +node --version > /dev/null 2>&1 +_dq_report 'node' $? + +perl -v > /dev/null 2>&1 +_dq_report 'perl' $? + +python --version > /dev/null 2>&1 +_dq_report 'python' $? +ruby -v > /dev/null 2>&1 +_dq_report 'ruby' $? + +vi --version > /dev/null 2>&1 +_dq_report 'vi' $? +echo Your dq is $OK / $(($OK+$KO)) + +exit $KO diff --git a/bin/db/dq.sh b/bin/db/dq.sh new file mode 100644 index 0000000..87132fe --- /dev/null +++ b/bin/db/dq.sh @@ -0,0 +1,28 @@ +OK=0 +KO=0 + +_dq_report () { + if [ "$2" -eq 0 ]; then + echo "✔ $1" + OK=$(($OK+1)) + else + echo "✘ $1" + KO=$(($KO+1)) + fi +} + +mongo --version > /dev/null 2>&1 +_dq_report 'mongo client' $? + +mongod --version > /dev/null 2>&1 +_dq_report 'mongo server' $? + +mysql --version > /dev/null 2>&1 +_dq_report 'mysql client' $? + +psql --version > /dev/null 2>&1 +_dq_report 'postgres client' $? + +echo Your dq is $OK / $(($OK+$KO)) + +exit $KO diff --git a/bin/frontend_dev/dq.sh b/bin/frontend_dev/dq.sh new file mode 100644 index 0000000..26edf96 --- /dev/null +++ b/bin/frontend_dev/dq.sh @@ -0,0 +1,17 @@ +OK=0 +KO=0 + +_dq_report () { + if [ "$2" -eq 0 ]; then + echo "✔ $1" + OK=$(($OK+1)) + else + echo "✘ $1" + KO=$(($KO+1)) + fi +} + + +echo Your dq is $OK / $(($OK+$KO)) + +exit $KO diff --git a/bin/groovy_dev/dq.sh b/bin/groovy_dev/dq.sh new file mode 100644 index 0000000..7b90d25 --- /dev/null +++ b/bin/groovy_dev/dq.sh @@ -0,0 +1,27 @@ +OK=0 +KO=0 + +_dq_report () { + if [ "$2" -eq 0 ]; then + echo "✔ $1" + OK=$(($OK+1)) + else + echo "✘ $1" + KO=$(($KO+1)) + fi +} + +gradle -v > /dev/null 2>&1 +_dq_report 'gradle' $? +groovy --version > /dev/null 2>&1 +_dq_report 'groovy' $? +groovyc -version > /dev/null 2>&1 +_dq_report 'groovyc' $? +java -version > /dev/null 2>&1 +_dq_report 'java' $? + +lazybones --version > /dev/null 2>&1 +_dq_report 'lazybones' $? +echo Your dq is $OK / $(($OK+$KO)) + +exit $KO diff --git a/bin/java_dev/dq.sh b/bin/java_dev/dq.sh new file mode 100644 index 0000000..a6ea2bc --- /dev/null +++ b/bin/java_dev/dq.sh @@ -0,0 +1,30 @@ +OK=0 +KO=0 + +_dq_report () { + if [ "$2" -eq 0 ]; then + echo "✔ $1" + OK=$(($OK+1)) + else + echo "✘ $1" + KO=$(($KO+1)) + fi +} + +ant -version > /dev/null 2>&1 +_dq_report 'ant' $? +gradle -v > /dev/null 2>&1 +_dq_report 'gradle' $? +java -version > /dev/null 2>&1 +_dq_report 'java' $? + +# http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4380614 +# jdk +javac -version > /dev/null 2>&1 +_dq_report 'javac' $? + +mvn -v > /dev/null 2>&1 +_dq_report 'maven' $? +echo Your dq is $OK / $(($OK+$KO)) + +exit $KO diff --git a/bin/ruby_dev/dq.sh b/bin/ruby_dev/dq.sh new file mode 100644 index 0000000..7e4e762 --- /dev/null +++ b/bin/ruby_dev/dq.sh @@ -0,0 +1,31 @@ +OK=0 +KO=0 + +_dq_report () { + if [ "$2" -eq 0 ]; then + echo "✔ $1" + OK=$(($OK+1)) + else + echo "✘ $1" + KO=$(($KO+1)) + fi +} + +bundle -v > /dev/null 2>&1 +_dq_report 'bundler' $? + +gem -v > /dev/null 2>&1 +_dq_report 'gem' $? + +rake -V > /dev/null 2>&1 +_dq_report 'rake' $? + +ruby -v > /dev/null 2>&1 +_dq_report 'ruby' $? + +rvm -v > /dev/null 2>&1 +_dq_report 'rvm' $? + +echo Your dq is $OK / $(($OK+$KO)) + +exit $KO diff --git a/bin/scala_dev/dq.sh b/bin/scala_dev/dq.sh new file mode 100644 index 0000000..f263f92 --- /dev/null +++ b/bin/scala_dev/dq.sh @@ -0,0 +1,37 @@ +OK=0 +KO=0 + +_dq_report () { + if [ "$2" -eq 0 ]; then + echo "✔ $1" + OK=$(($OK+1)) + else + echo "✘ $1" + KO=$(($KO+1)) + fi +} + +java -version > /dev/null 2>&1 +_dq_report 'java' $? + +# this guy downloads the entire internet before telling its version +sbt sbt-version > /dev/null 2>&1 +_dq_report 'sbt' $? + +scala -version > /dev/null 2>&1 + +# this guy has its own idea of exit codes, fix it! +if [ $? -eq 1 ]; then + STATUS=0 +else + STATUS=1 +fi + +_dq_report 'scala' $STATUS + +scalac -version > /dev/null 2>&1 +_dq_report 'scalac' $? + +echo Your dq is $OK / $(($OK+$KO)) + +exit $KO diff --git a/build.rb b/build.rb new file mode 100644 index 0000000..fb2909c --- /dev/null +++ b/build.rb @@ -0,0 +1,30 @@ +# Usage: +# ruby build.rb ... | sh + + +groups = { + :all => "*/*", + :core => "core/*", + :java_dev => ["core/java", "java/*"], + :clojure_dev => ["core/java", "clojure/*"], + :groovy_dev => ["core/java","java/gradle", "groovy/*"], + :scala_dev => ["core/java", "scala/*"], + :ruby_dev => ["core/ruby", "ruby/*"], + :frontend_dev => ["core/*", "frontend/*"], + :db => ["db/*"] +} + +tap_it = Proc.new { |it| $stderr.puts "tapped - #{it}" } +# use `.tap(&tap_it)` at any point in chain to print the values +# tap_it writes to `stderr` +# `ruby build.rb > /dev/null` to exclude the stdout of the script + +content = + (ARGV.empty? ? ["core"] : ARGV) # groups_to_load + .collect { |group| groups[group.to_sym] }.flatten.compact # patterns + .collect { |pattern| Dir["lib/#{pattern}.sh"] }.flatten.uniq # sh files + .sort { |x, y| File.basename(x) <=> File.basename(y) } # sort, remove if you dont want + .collect { |file| File.read(file) }.join("\n") # concat + +puts [File.read("include/setup.sh"), content, File.read("include/report.sh")].join("\n") + diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..cc43ae9 --- /dev/null +++ b/build.sh @@ -0,0 +1,10 @@ +#!/bin/sh +ruby build.rb groovy_dev > bin/groovy_dev/dq.sh +ruby build.rb ruby_dev > bin/ruby_dev/dq.sh +ruby build.rb scala_dev > bin/scala_dev/dq.sh +ruby build.rb java_dev > bin/java_dev/dq.sh +ruby build.rb db > bin/db/dq.sh +ruby build.rb core > bin/core/dq.sh +ruby build.rb clojure_dev > bin/clojure_dev/dq.sh +ruby build.rb all > bin/all/dq.sh +ruby build.rb forntend_dev > bin/frontend_dev/dq.sh \ No newline at end of file diff --git a/include/report.sh b/include/report.sh new file mode 100644 index 0000000..70f6f1b --- /dev/null +++ b/include/report.sh @@ -0,0 +1,3 @@ +echo Your dq is $OK / $(($OK+$KO)) + +exit $KO diff --git a/include/setup.sh b/include/setup.sh new file mode 100644 index 0000000..76ce77d --- /dev/null +++ b/include/setup.sh @@ -0,0 +1,12 @@ +OK=0 +KO=0 + +_dq_report () { + if [ "$2" -eq 0 ]; then + echo "✔ $1" + OK=$(($OK+1)) + else + echo "✘ $1" + KO=$(($KO+1)) + fi +} diff --git a/lib/clojure/clj.sh b/lib/clojure/clj.sh new file mode 100644 index 0000000..88bba9f --- /dev/null +++ b/lib/clojure/clj.sh @@ -0,0 +1,3 @@ +## surprisingly no option for version that i could find of +clj --help > /dev/null 2>&1 +_dq_report 'clojure' $? \ No newline at end of file diff --git a/lib/clojure/emacs.sh b/lib/clojure/emacs.sh new file mode 100644 index 0000000..0441f44 --- /dev/null +++ b/lib/clojure/emacs.sh @@ -0,0 +1,2 @@ +emacs --version > /dev/null 2>&1 +_dq_report 'emacs' $? \ No newline at end of file diff --git a/lib/clojure/lein.sh b/lib/clojure/lein.sh new file mode 100644 index 0000000..cc0417e --- /dev/null +++ b/lib/clojure/lein.sh @@ -0,0 +1,2 @@ +lein -v > /dev/null 2>&1 +_dq_report 'leiningen' $? \ No newline at end of file diff --git a/lib/core/curl.sh b/lib/core/curl.sh new file mode 100644 index 0000000..2641a50 --- /dev/null +++ b/lib/core/curl.sh @@ -0,0 +1,2 @@ +curl --version > /dev/null 2>&1 +_dq_report 'curl' $? diff --git a/lib/core/git.sh b/lib/core/git.sh new file mode 100644 index 0000000..7b89c39 --- /dev/null +++ b/lib/core/git.sh @@ -0,0 +1,2 @@ +git --version > /dev/null 2>&1 +_dq_report 'git' $? diff --git a/lib/core/java.sh b/lib/core/java.sh new file mode 100644 index 0000000..b545853 --- /dev/null +++ b/lib/core/java.sh @@ -0,0 +1,2 @@ +java -version > /dev/null 2>&1 +_dq_report 'java' $? diff --git a/lib/core/node.sh b/lib/core/node.sh new file mode 100644 index 0000000..8c5224c --- /dev/null +++ b/lib/core/node.sh @@ -0,0 +1,2 @@ +node --version > /dev/null 2>&1 +_dq_report 'node' $? diff --git a/lib/core/perl.sh b/lib/core/perl.sh new file mode 100644 index 0000000..c06e150 --- /dev/null +++ b/lib/core/perl.sh @@ -0,0 +1,2 @@ +perl -v > /dev/null 2>&1 +_dq_report 'perl' $? diff --git a/lib/core/python.sh b/lib/core/python.sh new file mode 100644 index 0000000..444a879 --- /dev/null +++ b/lib/core/python.sh @@ -0,0 +1,2 @@ +python --version > /dev/null 2>&1 +_dq_report 'python' $? \ No newline at end of file diff --git a/lib/core/ruby.sh b/lib/core/ruby.sh new file mode 100644 index 0000000..d5cda91 --- /dev/null +++ b/lib/core/ruby.sh @@ -0,0 +1,2 @@ +ruby -v > /dev/null 2>&1 +_dq_report 'ruby' $? diff --git a/lib/core/vi.sh b/lib/core/vi.sh new file mode 100644 index 0000000..7ce0dd6 --- /dev/null +++ b/lib/core/vi.sh @@ -0,0 +1,2 @@ +vi --version > /dev/null 2>&1 +_dq_report 'vi' $? \ No newline at end of file diff --git a/lib/db/mongo.sh b/lib/db/mongo.sh new file mode 100644 index 0000000..9201808 --- /dev/null +++ b/lib/db/mongo.sh @@ -0,0 +1,2 @@ +mongo --version > /dev/null 2>&1 +_dq_report 'mongo client' $? diff --git a/lib/db/mongod.sh b/lib/db/mongod.sh new file mode 100644 index 0000000..19d4983 --- /dev/null +++ b/lib/db/mongod.sh @@ -0,0 +1,2 @@ +mongod --version > /dev/null 2>&1 +_dq_report 'mongo server' $? diff --git a/lib/db/mysql.sh b/lib/db/mysql.sh new file mode 100644 index 0000000..8dcd6f2 --- /dev/null +++ b/lib/db/mysql.sh @@ -0,0 +1,2 @@ +mysql --version > /dev/null 2>&1 +_dq_report 'mysql client' $? diff --git a/lib/db/psql.sh b/lib/db/psql.sh new file mode 100644 index 0000000..c70e9b3 --- /dev/null +++ b/lib/db/psql.sh @@ -0,0 +1,2 @@ +psql --version > /dev/null 2>&1 +_dq_report 'postgres client' $? diff --git a/lib/frontend/bower.sh b/lib/frontend/bower.sh new file mode 100644 index 0000000..20632e0 --- /dev/null +++ b/lib/frontend/bower.sh @@ -0,0 +1,2 @@ +bower --version > /dev/null 2>&1 +_dq_report 'bower' $? \ No newline at end of file diff --git a/lib/frontend/coffee.sh b/lib/frontend/coffee.sh new file mode 100644 index 0000000..f09123d --- /dev/null +++ b/lib/frontend/coffee.sh @@ -0,0 +1,2 @@ +coffee --version > /dev/null 2>&1 +_dq_report 'coffee' $? \ No newline at end of file diff --git a/lib/frontend/grunt.sh b/lib/frontend/grunt.sh new file mode 100644 index 0000000..aba0645 --- /dev/null +++ b/lib/frontend/grunt.sh @@ -0,0 +1,2 @@ +grunt --version > /dev/null 2>&1 +_dq_report 'grunt' $? \ No newline at end of file diff --git a/lib/frontend/npm.sh b/lib/frontend/npm.sh new file mode 100644 index 0000000..6d72961 --- /dev/null +++ b/lib/frontend/npm.sh @@ -0,0 +1,2 @@ +npm --version > /dev/null 2>&1 +_dq_report 'npm' $? \ No newline at end of file diff --git a/lib/frontend/sass.sh b/lib/frontend/sass.sh new file mode 100644 index 0000000..4338e85 --- /dev/null +++ b/lib/frontend/sass.sh @@ -0,0 +1,2 @@ +sass --version > /dev/null 2>&1 +_dq_report 'sass' $? \ No newline at end of file diff --git a/lib/frontend/yo.sh b/lib/frontend/yo.sh new file mode 100644 index 0000000..1d2000b --- /dev/null +++ b/lib/frontend/yo.sh @@ -0,0 +1,2 @@ +yo --version > /dev/null 2>&1 +_dq_report 'yoeman' $? diff --git a/lib/groovy/groovy.sh b/lib/groovy/groovy.sh new file mode 100644 index 0000000..7b96341 --- /dev/null +++ b/lib/groovy/groovy.sh @@ -0,0 +1,2 @@ +groovy --version > /dev/null 2>&1 +_dq_report 'groovy' $? \ No newline at end of file diff --git a/lib/groovy/groovyc.sh b/lib/groovy/groovyc.sh new file mode 100644 index 0000000..531afd2 --- /dev/null +++ b/lib/groovy/groovyc.sh @@ -0,0 +1,2 @@ +groovyc -version > /dev/null 2>&1 +_dq_report 'groovyc' $? \ No newline at end of file diff --git a/lib/groovy/lazybones.sh b/lib/groovy/lazybones.sh new file mode 100644 index 0000000..7bf5ac8 --- /dev/null +++ b/lib/groovy/lazybones.sh @@ -0,0 +1,2 @@ +lazybones --version > /dev/null 2>&1 +_dq_report 'lazybones' $? \ No newline at end of file diff --git a/lib/java/ant.sh b/lib/java/ant.sh new file mode 100644 index 0000000..4b3e239 --- /dev/null +++ b/lib/java/ant.sh @@ -0,0 +1,2 @@ +ant -version > /dev/null 2>&1 +_dq_report 'ant' $? \ No newline at end of file diff --git a/lib/java/gradle.sh b/lib/java/gradle.sh new file mode 100644 index 0000000..d3bba2f --- /dev/null +++ b/lib/java/gradle.sh @@ -0,0 +1,2 @@ +gradle -v > /dev/null 2>&1 +_dq_report 'gradle' $? \ No newline at end of file diff --git a/lib/java/javac.sh b/lib/java/javac.sh new file mode 100644 index 0000000..89c67bc --- /dev/null +++ b/lib/java/javac.sh @@ -0,0 +1,4 @@ +# http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4380614 +# jdk +javac -version > /dev/null 2>&1 +_dq_report 'javac' $? diff --git a/lib/java/mvn.sh b/lib/java/mvn.sh new file mode 100644 index 0000000..00cb64c --- /dev/null +++ b/lib/java/mvn.sh @@ -0,0 +1,2 @@ +mvn -v > /dev/null 2>&1 +_dq_report 'maven' $? \ No newline at end of file diff --git a/lib/ruby/bundle.sh b/lib/ruby/bundle.sh new file mode 100644 index 0000000..784387a --- /dev/null +++ b/lib/ruby/bundle.sh @@ -0,0 +1,2 @@ +bundle -v > /dev/null 2>&1 +_dq_report 'bundler' $? diff --git a/lib/ruby/gem.sh b/lib/ruby/gem.sh new file mode 100644 index 0000000..0e16ab9 --- /dev/null +++ b/lib/ruby/gem.sh @@ -0,0 +1,2 @@ +gem -v > /dev/null 2>&1 +_dq_report 'gem' $? diff --git a/lib/ruby/rake.sh b/lib/ruby/rake.sh new file mode 100644 index 0000000..0c42c0a --- /dev/null +++ b/lib/ruby/rake.sh @@ -0,0 +1,2 @@ +rake -V > /dev/null 2>&1 +_dq_report 'rake' $? diff --git a/lib/ruby/rvm.sh b/lib/ruby/rvm.sh new file mode 100644 index 0000000..5fd7639 --- /dev/null +++ b/lib/ruby/rvm.sh @@ -0,0 +1,2 @@ +rvm -v > /dev/null 2>&1 +_dq_report 'rvm' $? diff --git a/lib/scala/sbt.sh b/lib/scala/sbt.sh new file mode 100644 index 0000000..0ed478b --- /dev/null +++ b/lib/scala/sbt.sh @@ -0,0 +1,3 @@ +# this guy downloads the entire internet before telling its version +sbt sbt-version > /dev/null 2>&1 +_dq_report 'sbt' $? diff --git a/lib/scala/scala.sh b/lib/scala/scala.sh new file mode 100644 index 0000000..cf73515 --- /dev/null +++ b/lib/scala/scala.sh @@ -0,0 +1,10 @@ +scala -version > /dev/null 2>&1 + +# this guy has its own idea of exit codes, fix it! +if [ $? -eq 1 ]; then + STATUS=0 +else + STATUS=1 +fi + +_dq_report 'scala' $STATUS diff --git a/lib/scala/scalac.sh b/lib/scala/scalac.sh new file mode 100644 index 0000000..ebdbf25 --- /dev/null +++ b/lib/scala/scalac.sh @@ -0,0 +1,2 @@ +scalac -version > /dev/null 2>&1 +_dq_report 'scalac' $? diff --git a/urls.rb b/urls.rb new file mode 100644 index 0000000..22b8094 --- /dev/null +++ b/urls.rb @@ -0,0 +1,4 @@ +Dir["bin/**/*.sh"].each { |file| + puts "#### " + File.dirname(file).gsub("bin/", "").gsub("_", " ") + puts "`curl -sL https://raw.github.com/kdabir/dq/master/#{file} | sh`" +}