Skip to content
Browse files

support for non osx ruby platforms ;)

  • Loading branch information...
1 parent 54ad974 commit 8ca41ba7e89973f7b5a8f91f6a4314d94799ef73 @vitaly vitaly committed Jun 11, 2012
Showing with 14 additions and 1 deletion.
  1. +5 −1 Makefile
  2. +9 −0 find-ruby.sh
View
6 Makefile
@@ -1,3 +1,7 @@
+# find out where ruby is. can override this by providing environment or command
+# line variable
+RUBY ?= $(shell ./find-ruby.sh)
+
update: install-vundle vundles install-command-t
install: cleanup update
@@ -12,4 +16,4 @@ vundles:
vim -u ./vundles.vim +BundleInstall
install-command-t:
- cd bundle/Command-T/ruby/command-t/ && /opt/local/bin/ruby extconf.rb && make
+ cd bundle/Command-T/ruby/command-t/ && $(RUBY) extconf.rb && make
View
9 find-ruby.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+if [ '/opt/local/bin/vim' = `which vim` -a -e /opt/local/bin/ruby ]; then
+ echo /opt/local/bin/ruby
+elif [ -e '/usr/bin/ruby' ]; then
+ echo /usr/bin/ruby
+else
+ which ruby
+fi

0 comments on commit 8ca41ba

Please sign in to comment.
Something went wrong with that request. Please try again.