diff --git a/Rakefile b/Rakefile index bec052c..d2d2451 100644 --- a/Rakefile +++ b/Rakefile @@ -14,14 +14,14 @@ task :install => [:submodule_init, :submodules] do install_rvm_binstubs # this has all the runcoms from this directory. - file_operation(Dir.glob('git/*')) if want_to_install?('git configs (color, aliases)') - file_operation(Dir.glob('irb/*')) if want_to_install?('irb/pry configs (more colorful)') - file_operation(Dir.glob('ruby/*')) if want_to_install?('rubygems config (faster/no docs)') - file_operation(Dir.glob('ctags/*')) if want_to_install?('ctags config (better js/ruby support)') - file_operation(Dir.glob('tmux/*')) if want_to_install?('tmux config') - file_operation(Dir.glob('vimify/*')) if want_to_install?('vimification of command line tools') + install_files(Dir.glob('git/*')) if want_to_install?('git configs (color, aliases)') + install_files(Dir.glob('irb/*')) if want_to_install?('irb/pry configs (more colorful)') + install_files(Dir.glob('ruby/*')) if want_to_install?('rubygems config (faster/no docs)') + install_files(Dir.glob('ctags/*')) if want_to_install?('ctags config (better js/ruby support)') + install_files(Dir.glob('tmux/*')) if want_to_install?('tmux config') + install_files(Dir.glob('vimify/*')) if want_to_install?('vimification of command line tools') if want_to_install?('vim configuration (highly recommended)') - file_operation(Dir.glob('{vim,vimrc}')) + install_files(Dir.glob('{vim,vimrc}')) Rake::Task["install_vundle"].execute end @@ -261,7 +261,7 @@ def install_prezto run %{ ln -nfs "$HOME/.yadr/zsh/prezto" "${ZDOTDIR:-$HOME}/.zprezto" } # The prezto runcoms are only going to be installed if zprezto has never been installed - file_operation(Dir.glob('zsh/prezto/runcoms/z*'), :copy) + install_files(Dir.glob('zsh/prezto/runcoms/z*'), :copy) puts puts "Overriding prezto ~/.zpreztorc with YADR's zpreztorc to enable additional modules..." @@ -298,7 +298,7 @@ def want_to_install? (section) end end -def file_operation(files, method = :symlink) +def install_files(files, method = :symlink) files.each do |f| file = f.split('/').last source = "#{ENV["PWD"]}/#{f}"