From 08528c802504441cccc26bd459f1e0742af4bc03 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Fri, 15 May 2015 09:27:49 -0700 Subject: [PATCH] [meta] Add a task for updating dlanham wallpapers to the Rakefile --- Rakefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 6e7ac04..e6172f9 100644 --- a/Rakefile +++ b/Rakefile @@ -1,9 +1,20 @@ # 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 - sh 'find ~/Dropbox -name .DS_Store -print0 | xargs -0 rm' + sh 'find ~/Dropbox -name .DS_Store -print0 | xargs -0 rm -v' end task all: %i[ ds_store ] end + +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' + end + end +end