symlink subfolder

This commit is contained in:
j 2018-08-10 11:59:56 +01:00
parent 54ffb2c483
commit 2480ea6b05

View file

@ -12,6 +12,15 @@ os.chdir(base)
for root, folders, files in os.walk(join(base, 'static')):
for f in files:
src = join(root, f)
if 'ontology/' in src:
continue
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)
src = join(base, 'static', 'ontology')
target = src.replace(base, '/srv/pandora')
rel_src = os.path.relpath(src, dirname(target))
if os.path.exists(target):