Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'add_command-t_install_task' into my_pulls
* add_command-t_install_task: Janus tools/Command T: Update the install script to use the new method. Rakefile: Fix typos in the comments
- Loading branch information
Showing
1 changed file
with
9 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,12 @@ | ||
namespace :plugins do | ||
desc "Install the command-t plugin." | ||
task :install_command_t do | ||
if File.exists?("#{root_path}/janus-tools/command-t/ruby/command-t") | ||
Dir.chdir "#{root_path}/janus-tools/command-t/ruby/command-t" do | ||
if File.exists?("/usr/bin/ruby1.8") # prefer 1.8 on *.deb systems | ||
sh "/usr/bin/ruby1.8 extconf.rb" | ||
elsif File.exists?("/usr/bin/ruby") # prefer system rubies | ||
sh "/usr/bin/ruby extconf.rb" | ||
elsif `rvm > /dev/null 2>&1` && $?.exitstatus == 0 | ||
sh "rvm system ruby extconf.rb" | ||
end | ||
sh "make clean && make" | ||
end | ||
else | ||
abort "The submodule is not ready, please run 'git submodule update --init'" | ||
install_vim_plugin "janus-tools", "command-t" do | ||
Dir.chdir "#{root_path}/janus-tools/command-t/ruby/command-t" do | ||
if File.exists?("/usr/bin/ruby1.8") # prefer 1.8 on *.deb systems | ||
sh "/usr/bin/ruby1.8 extconf.rb" | ||
elsif File.exists?("/usr/bin/ruby") # prefer system rubies | ||
sh "/usr/bin/ruby extconf.rb" | ||
elsif `rvm > /dev/null 2>&1` && $?.exitstatus == 0 | ||
sh "rvm system ruby extconf.rb" | ||
end | ||
sh "make clean && make" | ||
end | ||
|
||
task :install => :install_command_t | ||
end |