[meta] Add task for syncing submodules

pull/28/head
Alpha Chen 10 years ago
parent 2ddfa3c607
commit ecba942147

@ -1,5 +1,3 @@
# rsync -avz --exclude 'Newest Additions' --exclude '*.DS_Store' . ~/Dropbox/wallpapers/dlanham\ wallpapers
namespace :clean do namespace :clean do
desc 'Remove .DS_Store files from Dropbox' desc 'Remove .DS_Store files from Dropbox'
task :ds_store do task :ds_store do
@ -13,8 +11,19 @@ namespace :sync do
desc 'Sync David Lanham wallpapers (assumes the unzipped updates are in ~/Downloads)' desc 'Sync David Lanham wallpapers (assumes the unzipped updates are in ~/Downloads)'
task :dlanham do task :dlanham do
FileList[File.expand_path('~/Downloads/dlanham*')].each do |dir| FileList[File.expand_path('~/Downloads/dlanham*')].each do |dir|
Dir.chdir dir Dir.chdir dir do
sh 'rsync -avz --exclude "Newest Additions" --exclude "*.DS_Store" . ~/Dropbox/wallpapers/dlanham\ wallpapers' sh 'rsync -avz --exclude "Newest Additions" --exclude "*.DS_Store" . ~/Dropbox/wallpapers/dlanham\ wallpapers'
end end
rm_r dir
end
end
desc 'Sync submodules'
task :submodules do
sh 'git submodule foreach git pull'
Dir.chdir 'src/prezto' do
sh 'git fetch upstream'
sh 'git rebase upstream/master'
end
end end
end end

Loading…
Cancel
Save