Skip to content

Instantly share code, notes, and snippets.

@matthewmccullough
Created February 1, 2011 19:11
Show Gist options
  • Save matthewmccullough/806413 to your computer and use it in GitHub Desktop.
Save matthewmccullough/806413 to your computer and use it in GitHub Desktop.
Rake build file that should create an output directory
require 'rake'
HOME = "#{File.dirname(__FILE__)}"
DEST = "#{HOME}/output"
task :default => [:genoutputfolders]
task :genoutputfolders do
directory "output"
directory "#{DEST}"
file "#{DEST}" do |t| mkdir t.name end
end
# Rake -t -v
# (in /Users/mccm06/Documents/Temp/Scratch/samplerake)
# ** Invoke default (first_time)
# ** Invoke genoutputfolders (first_time)
# ** Execute genoutputfolders
# ** Execute default
#
# No directories are created on Mac OS 10.6.6 with Rake 0.8.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment