You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by vb...@apache.org on 2008/08/22 23:27:25 UTC

svn commit: r688198 - /incubator/buildr/trunk/_buildr

Author: vborja
Date: Fri Aug 22 14:27:25 2008
New Revision: 688198

URL: http://svn.apache.org/viewvc?rev=688198&view=rev
Log:
_buildr script uses absolute paths and ENV['_BUILDR_RB']

The _BUILDR_RB environment variable can be used to set the path to
the ruby/jruby executable.

For example to run buildr from source using jruby:
   export PATH=$PATH:$BUILDR_SRC
   export _BUILDR_RB=/path/to/jruby
   _buildr # from any directory

Modified:
    incubator/buildr/trunk/_buildr

Modified: incubator/buildr/trunk/_buildr
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/_buildr?rev=688198&r1=688197&r2=688198&view=diff
==============================================================================
--- incubator/buildr/trunk/_buildr (original)
+++ incubator/buildr/trunk/_buildr Fri Aug 22 14:27:25 2008
@@ -1,3 +1,17 @@
-#!/usr/bin/env sh
+#!/usr/bin/env ruby
+
 # Run buildr from source, specifically for testing stuff without doing a rake install.
-ruby -Ilib -Iaddon bin/buildr $*
+# The _BUILDR_RB environment variable can be used to set the path to the ruby/jruby executable.
+# For example to use jruby:
+#   export _BUILDR_RB=/path/to/jruby
+
+buildr_root = File.dirname(__FILE__)
+buildr_ruby = ENV['_BUILDR_RB'] || "ruby"
+cmd = [
+    buildr_ruby,
+    "-I"+File.join(buildr_root, "lib"),
+    "-I"+File.join(buildr_root, "addon"),
+    File.join(buildr_root, "bin", "buildr"),
+] + ARGV
+
+exec *cmd