Handle file:// URLs. Close #37

This commit is contained in:
Krystian Bacławski
2016-04-16 09:10:00 +02:00
parent ce44ffe266
commit 3aeb71b204
+4
View File
@@ -381,6 +381,10 @@ def fetch(name, url):
else:
with cwd(name):
execute('git', 'pull')
elif url.startswith('file'):
if not path.exists(name):
_, src = url.split('://')
copytree(src, name)
else:
panic('URL "%s" not recognized!', url)