From ecba942147cbdc48299c56dd5c22b5aabb8852ff Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Sun, 31 May 2015 17:33:35 -0700 Subject: [PATCH] [meta] Add task for syncing submodules --- Rakefile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index e6172f9..ec2b14a 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,3 @@ -# rsync -avz --exclude 'Newest Additions' --exclude '*.DS_Store' . ~/Dropbox/wallpapers/dlanham\ wallpapers - namespace :clean do desc 'Remove .DS_Store files from Dropbox' task :ds_store do @@ -13,8 +11,19 @@ namespace :sync do desc 'Sync David Lanham wallpapers (assumes the unzipped updates are in ~/Downloads)' task :dlanham do FileList[File.expand_path('~/Downloads/dlanham*')].each do |dir| - Dir.chdir dir - sh 'rsync -avz --exclude "Newest Additions" --exclude "*.DS_Store" . ~/Dropbox/wallpapers/dlanham\ wallpapers' + Dir.chdir dir do + sh 'rsync -avz --exclude "Newest Additions" --exclude "*.DS_Store" . ~/Dropbox/wallpapers/dlanham\ wallpapers' + 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