Permalink
Browse files

Separated clone and cleanup tasks

  • Loading branch information...
1 parent c13a1e5 commit f3a070e32601b1c85dfc2d8bac39dfae69034157 @soveran soveran committed Jul 23, 2009
Showing with 10 additions and 2 deletions.
  1. +10 −2 bin/monk
View
@@ -9,14 +9,22 @@ class MonkTasks < Thor
desc "init", "Initialize a Monk application"
def init(target)
+ clone(source, target)
+ cleanup(target)
+ end
+
+private
+
+ def clone(source, target)
say_status :fetching, source
system "git clone -q --depth 1 #{source} #{target}"
+ end
+
+ def cleanup(target)
inside(target) { remove_file ".git" }
say_status :create, target
end
-private
-
def source
monk_config["default"]
end

0 comments on commit f3a070e

Please sign in to comment.