link logo/icon

This commit is contained in:
j 2019-11-07 17:07:15 +01:00
parent 70a8392793
commit cb76d29f0b
1 changed files with 13 additions and 0 deletions

View File

@ -33,6 +33,19 @@ for root, folders, files in os.walk(join(base, 'static')):
os.makedirs(target_folder)
os.symlink(rel_src, target)
for img in ('logo.png', 'icon.png'):
f = join('/srv/pandora/static/png', img)
custom = join('/srv/pandora/static/png', img.replace('.png', '.%s.png' % name))
if os.path.exists(custom):
if not os.path.islink(f):
os.unlink(f)
else:
path = os.path.realpath(f)
if name not in path:
os.unlink(f)
if not os.path.exists(f):
os.symlink(os.path.basename(custom), f)
if overwrite:
os.chdir('/srv/pandora/static/js')
for filename, sitename in overwrite: