Add dir exist check for git rake helper

This commit is contained in:
Henrik Lissner 2014-06-21 04:05:51 -04:00
parent cb3a04c708
commit a51ccde184

View file

@ -1,8 +1,10 @@
include Rake::DSL include Rake::DSL
def git(url,dest) def git(url,dest)
if not Dir.exists?(dest)
sh "git clone #{url} #{dest}" unless Dir.exists?(dest) sh "git clone #{url} #{dest}" unless Dir.exists?(dest)
end end
end
def github(repo,dest) def github(repo,dest)
git "git@github.com:#{repo}.git", dest git "git@github.com:#{repo}.git", dest