mirror of
https://github.com/meineerde/dotfiles.git
synced 2026-02-06 00:53:23 +00:00
Cleanup Rakefile
This commit is contained in:
parent
5b354de062
commit
15bacd87ef
30
Rakefile
30
Rakefile
@ -8,7 +8,7 @@ namespace :install do
|
||||
desc "installs #{name} configuration"
|
||||
task(name) do
|
||||
Dir[*files].collect do |file|
|
||||
full = File.join File.dirname(__FILE__), File.basename(file, '.dotfile')
|
||||
full = File.join File.dirname(__FILE__), file.sub(/\.dotfile$/,'')
|
||||
Dir.chdir ENV["HOME"] do
|
||||
mkdir_p File.dirname(file)
|
||||
File.delete(file) if (File.exist? file and File.directory? full)
|
||||
@ -20,33 +20,9 @@ namespace :install do
|
||||
end
|
||||
|
||||
files :irb, ".irbrc", ".config/irb/*.rb"
|
||||
files :dot, *%w(.bash_profile .bashrc .gemrc .gitignore_global .gitconfig .ackrc .rvmrc.dotfile)
|
||||
files :dot, *%w[.bash_profile .bashrc .gemrc .gitignore_global .gitconfig .ackrc .rvmrc.dotfile]
|
||||
files :bin, "bin/*"
|
||||
|
||||
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
|
||||
files :texmf_folder, "texmf"
|
||||
Rake::Task[:texmf_folder].invoke
|
||||
end
|
||||
|
||||
desc "Setup SublimeText2"
|
||||
task :sublime do
|
||||
end
|
||||
|
||||
desc "Sublime Configuration"
|
||||
task :sublime_config do
|
||||
sublime_path = "#{ENV['HOME']}/Library/Application Support/Sublime Text 2"
|
||||
df_dir = File.expand_path("../sublime", __FILE__)
|
||||
|
||||
FileUtils.ln_sf(df_dir, "#{sublime_path}/Packages/User") if File.exist?(sublime_path)
|
||||
end
|
||||
task :sublime => :sublime_config
|
||||
|
||||
task :all => [:texmf, :sublime]
|
||||
files :vim, *%w[.vim .vimrc]
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user