Permalink
Browse files

Rakefile: Add support for plugin installation.

  • Loading branch information...
1 parent d210761 commit 25da4c2c5cbcc01f65e27c2091ad3a68056804b9 @kalbasit kalbasit committed Nov 1, 2011
Showing with 20 additions and 1 deletion.
  1. +20 −1 Rakefile
View
@@ -1,7 +1,22 @@
+# Return the root path
+#
+# @return [String] The absolute path to Janus repository
+def root_path
+ @root_path ||= File.expand_path(File.dirname(__FILE__))
+end
+
def expand(file)
File.expand_path(file)
end
+namespace :plugins do
+ task :install do
+ # dummy task for plugins installations hooku.
+ end
+end
+
+Dir["#{root_path}/janus-*/tasks/**.rake"].each { |f| load f }
+
task expand("~/.vimrc") => "vimrc" do
sh "ln -s ~/.vim/vimrc ~/.vimrc"
end
@@ -16,4 +31,8 @@ task :update do
sh "git submodule update"
end
-task :default => [:update, expand("~/.vimrc"), expand("~/.gvimrc")]
+task :install => [:update, "plugins:install"] do
+ # Dummy task to run plugins installation tasks
+end
+
+task :default => [:install, expand("~/.vimrc"), expand("~/.gvimrc")]

0 comments on commit 25da4c2

Please sign in to comment.