Add dir exist check for git rake helper
This commit is contained in:
parent
cb3a04c708
commit
a51ccde184
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue