working on publish template command #5
This commit is contained in:
parent
5ddd69cfd3
commit
71efba587e
|
@ -162,9 +162,14 @@ def create_template(option):
|
|||
|
||||
item_src = '%s%s'%(db.srv_wip_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)
|
||||
|
||||
|
||||
#================================#
|
||||
# Publish template in www server #
|
||||
#--------------------------------#
|
||||
|
|
Loading…
Reference in New Issue