From f3b16513491500daf9bfc5da48945e8137072cb1 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sun, 24 Nov 2013 20:35:18 -0500 Subject: [PATCH] add "clobber" rake target --- Rakefile.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Rakefile.rb b/Rakefile.rb index a0d05ce..b75cb74 100644 --- a/Rakefile.rb +++ b/Rakefile.rb @@ -5,6 +5,7 @@ rescue Bundler::BundlerError => e raise "Unable to Bundler.setup(): You probably need to run `bundle install`: " + e.message end require "rscons" +require "fileutils" class Obj2D < Rscons::Builder def run(target, sources, cache, env, vars) @@ -46,3 +47,9 @@ task :default do env.Program("gss", sources) end end + +task :clobber do + ["build"].each do |dir| + FileUtils.rm_rf(dir) + end +end