diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..235a66d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule ".vim"] + path = .vim + url = git://github.com/carlhuda/janus.git diff --git a/.vim b/.vim new file mode 160000 index 0000000..137f4de --- /dev/null +++ b/.vim @@ -0,0 +1 @@ +Subproject commit 137f4de2325800159e4543257c80cf145cfa1934 diff --git a/Rakefile b/Rakefile index 4e101e2..c8c0083 100644 --- a/Rakefile +++ b/Rakefile @@ -6,9 +6,9 @@ namespace :install do desc "installs #{name} configuration" task(name) do Dir[*files].collect do |file| - full = File.join Dir.pwd, file + full = File.join File.dirname(__FILE__), file Dir.chdir ENV["HOME"] do - mkdir_p File.dirname(file) + mkdir_p File.dirname(file) File.delete(file) if (File.exist? file and File.directory? full) sh "ln -sf #{full} #{file}" end @@ -18,16 +18,31 @@ namespace :install do end install :irb, ".irbrc", ".config/irb/*.rb" - install :dot, *%w(.bash_profile .bashrc .gemrc .global_gitignore .gitconfig .ackrc) + install :dot, *%w(.bash_profile .bashrc .gemrc .global_gitignore .gitconfig .ackrc .vimrc.local) install :bin, "bin/*" - desc "installs the custom texmf folder" - task :texmf do + desc "Update all submodules" + task :submodules do system "git submodule init && git submodule update" + end + + desc "installs the custom texmf folder" + task :texmf => :submodules do install :texmf_folder, "texmf" Rake::Task[:texmf_folder].invoke end - task :all => :texmf + desc "Update the janus bundle" + task :vim => :submodules do + dir = ".vim" + tasks = Rake::Task.tasks + + Dir.chdir File.join(File.dirname(__FILE__), dir) do + system "rake" + end + install :vim, dir + end + + task :all => [:texmf, :vim] end