1
This commit is contained in:
parent
d735b1e1ed
commit
4f2dc9683c
@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
import json
|
import json
|
||||||
import urllib.request
|
import urllib.request
|
||||||
|
|
||||||
@ -14,4 +15,11 @@ projects = httpGet('http://git.kingsome.cn/api/v4/projects?',
|
|||||||
'per_page': 1000
|
'per_page': 1000
|
||||||
})
|
})
|
||||||
for proj in projects:
|
for proj in projects:
|
||||||
print(proj['path_with_namespace'])
|
http_url_to_repo = proj['http_url_to_repo']
|
||||||
|
name = proj['name']
|
||||||
|
path = proj['namespace']['path']
|
||||||
|
if not os.path.exists('repository/' + path):
|
||||||
|
os.mkdir('repository/' + path)
|
||||||
|
if not os.path.exists('repository/' + path + '/' + name):
|
||||||
|
os.system('cd repository/' + path + ' && git clone ' + http_url_to_repo)
|
||||||
|
os.system('cd repository/' + path + ' && git pull')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user