This commit is contained in:
aozhiwei 2022-04-19 11:08:40 +08:00
parent 9f1b98928d
commit 4271f11e34

View File

@ -127,13 +127,23 @@ projects = [
]
def pubOne(srcId, targetId):
resDir = '~/opensource/res'
confDir = '~/opensource/conf'
resDir = '~/opensource/res/'
confDir = '~/opensource/conf/'
gitDir = '~/opensource/publish' + '/z' + targetId
os.system(gitDir)
os.system('mkdir -p ' + gitDir)
for proj in projects:
cmd = 'cd ' + gitDir + ' && git clone ' + proj['git']
os.system(cmd)
#cmd = 'cd ' + gitDir + ' && git clone ' + proj['git']
#os.system(cmd)
if proj['conf']:
targetConf = proj['targetConf'].replace('$id', targetId)
cmd = 'cp -r ' + confDir + proj['conf'] + ' ' + confDir + targetConf
print(cmd)
#os.system(cmd)
if proj['res']:
targetRes = proj['targetRes'].replace('$id', targetId)
cmd = 'cp -r ' + resDir + proj['res'] + ' ' + resDir + targetRes
print(cmd)
#os.system(cmd)
def pub():
srcId = sys.argv[1]