add config
This commit is contained in:
parent
43d7ec33ae
commit
2de0bcba85
2 changed files with 1507 additions and 0 deletions
1488
config.jsonc
Normal file
1488
config.jsonc
Normal file
File diff suppressed because it is too large
Load diff
19
install.py
19
install.py
|
@ -28,8 +28,24 @@ for root, folders, files in os.walk(join(base, 'static')):
|
||||||
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)
|
||||||
|
target_folder = os.path.dirname(target)
|
||||||
|
if not os.path.exists(target_folder):
|
||||||
|
os.makedirs(target_folder)
|
||||||
os.symlink(rel_src, target)
|
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:
|
if overwrite:
|
||||||
os.chdir('/srv/pandora/static/js')
|
os.chdir('/srv/pandora/static/js')
|
||||||
for filename, sitename in overwrite:
|
for filename, sitename in overwrite:
|
||||||
|
@ -37,6 +53,9 @@ if overwrite:
|
||||||
target = '%s.%s.js' % (filename, name)
|
target = '%s.%s.js' % (filename, name)
|
||||||
if os.path.exists(target):
|
if os.path.exists(target):
|
||||||
os.unlink(target)
|
os.unlink(target)
|
||||||
|
target_folder = os.path.dirname(target)
|
||||||
|
if not os.path.exists(target_folder):
|
||||||
|
os.makedirs(target_folder)
|
||||||
os.symlink(src, target)
|
os.symlink(src, target)
|
||||||
|
|
||||||
os.chdir(base)
|
os.chdir(base)
|
||||||
|
|
Loading…
Reference in a new issue