Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
namespace :backup do BACKUP_TARGET_FOLDER = "\\\\my-server\\my-backup-folder" WIKI_ROOT = "C:\\pimki\\storage" def get_timestamp Time.now.strftime('%Y%m%d_%H%M%S') end desc "Backup the wiki to #{BACKUP_TARGET_FOLDER}" task :wiki do launch "xcopy /S /Y /I #{WIKI_ROOT} #{BACKUP_TARGET_FOLDER}\\backup_wiki_#{get_timestamp}" end end
This paste will be private.
From the Design Piracy series on my blog: