Skip to content

Instantly share code, notes, and snippets.

@tommorris
Created October 28, 2010 02:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tommorris/650487 to your computer and use it in GitHub Desktop.
Save tommorris/650487 to your computer and use it in GitHub Desktop.
# read http://forums.macosxhints.com/showthread.php?t=89968
task :default => [:sync]
desc "Sync automatically with e-book reader"
task :sync do
sh "unison -auto . \"/Volumes/NO NAME/\""
end
namespace :sync do
desc "Sync manually with e-book reader"
task :manual do
sh "unison . \"/Volumes/NO NAME/\""
end
desc "Sync with iPad [192.168.1.104]"
task :ipad do
sh "unison -perms 0 ./e_book/ /Volumes/192.168.1.104/"
end
namespace :ipad do
desc "Sync with iPad [192.168.1.104] manually"
task :manual do
sh "unison -perms 0 -auto ./e_book/ /Volumes/192.168.1.104/"
end
end
end
namespace :things do
#task :default => :all
desc "Build all"
multitask :all => ["things:today", "things:next", "things:inbox", "things:someday"] do
puts "All Things built"
end
desc "Build Things/Today"
task :today do
sh "things today > e_book/Things/Today.txt"
end
desc "Build Things/Next"
task :next do
sh "things next > e_book/Things/Next.txt"
end
desc "Build Things/Inbox"
task :inbox do
sh "things inbox > e_book/Things/Inbox.txt"
end
desc "Build Things/Someday"
task :someday do
sh "things someday > e_book/Things/Someday.txt"
end
end
desc "Eject the e-book reader"
task :eject do
sh "diskutil quiet eject \"/Volumes/NO NAME/\""
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment