working on publish template command #5

This commit is contained in:
Cyrille L 2023-03-03 17:04:14 +01:00
parent 5ddd69cfd3
commit 71efba587e
1 changed files with 6 additions and 1 deletions

View File

@ -162,9 +162,14 @@ def create_template(option):
item_src = '%s%s'%(db.srv_wip_tpl, item) item_src = '%s%s'%(db.srv_wip_tpl, item)
item_dst = '%s%s'%(db.srv_www_tpl, item) item_dst = '%s%s'%(db.srv_www_tpl, item)
if shutil.copy2(item_src, item_dst): if os.path.isdir(item_src):
shutil.copytree(item_src, item_dst)
print(' ├ Create dir :', item_dst)
else:
shutil.copy2(item_src, item_dst)
print(' ├ Create file:', item_dst) print(' ├ Create file:', item_dst)
#================================# #================================#
# Publish template in www server # # Publish template in www server #
#--------------------------------# #--------------------------------#