symlink subfolder
This commit is contained in:
parent
54ffb2c483
commit
2480ea6b05
1 changed files with 9 additions and 0 deletions
|
@ -12,12 +12,21 @@ os.chdir(base)
|
||||||
for root, folders, files in os.walk(join(base, 'static')):
|
for root, folders, files in os.walk(join(base, 'static')):
|
||||||
for f in files:
|
for f in files:
|
||||||
src = join(root, f)
|
src = join(root, f)
|
||||||
|
if 'ontology/' in src:
|
||||||
|
continue
|
||||||
target = src.replace(base, '/srv/pandora')
|
target = src.replace(base, '/srv/pandora')
|
||||||
rel_src = os.path.relpath(src, dirname(target))
|
rel_src = os.path.relpath(src, dirname(target))
|
||||||
if os.path.exists(target):
|
if os.path.exists(target):
|
||||||
os.unlink(target)
|
os.unlink(target)
|
||||||
os.symlink(rel_src, target)
|
os.symlink(rel_src, target)
|
||||||
|
|
||||||
|
src = join(base, 'static', 'ontology')
|
||||||
|
target = src.replace(base, '/srv/pandora')
|
||||||
|
rel_src = os.path.relpath(src, dirname(target))
|
||||||
|
if os.path.exists(target):
|
||||||
|
os.unlink(target)
|
||||||
|
os.symlink(rel_src, target)
|
||||||
|
|
||||||
os.chdir(base)
|
os.chdir(base)
|
||||||
src = join(base, 'config.jsonc')
|
src = join(base, 'config.jsonc')
|
||||||
target = '/srv/pandora/pandora/config.%s.jsonc' % name
|
target = '/srv/pandora/pandora/config.%s.jsonc' % name
|
||||||
|
|
Loading…
Reference in a new issue