pan.do/ra indiancine.ma overlay
This commit is contained in:
parent
94783f931f
commit
d99300e5a9
2 changed files with 60 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
*.pyc
|
||||
*.swp
|
58
install.py
Executable file
58
install.py
Executable file
|
@ -0,0 +1,58 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import os
|
||||
from os.path import join, abspath, basename, dirname
|
||||
|
||||
name = 'bakma'
|
||||
base = abspath(dirname(__file__))
|
||||
os.chdir(base)
|
||||
|
||||
for root, folders, files in os.walk(join(base, 'static')):
|
||||
for f in files:
|
||||
src = join(root, f)
|
||||
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)
|
||||
|
||||
'''
|
||||
overwrite = (
|
||||
('home', 'indiancinema'),
|
||||
('infoView', 'indiancinema'),
|
||||
)
|
||||
|
||||
os.chdir('/srv/pandora/static/js')
|
||||
for filename, sitename in overwrite:
|
||||
src = '%s.%s.js' % (filename, sitename)
|
||||
target = '%s.%s.js' % (filename, name)
|
||||
if os.path.exists(target):
|
||||
os.unlink(target)
|
||||
os.symlink(src, target)
|
||||
'''
|
||||
|
||||
os.chdir(base)
|
||||
src = join(base, 'config.jsonc')
|
||||
target = '/srv/pandora/pandora/config.%s.jsonc' % name
|
||||
rel_src = os.path.relpath(src, dirname(target))
|
||||
if os.path.exists(target):
|
||||
os.unlink(target)
|
||||
os.symlink(rel_src, target)
|
||||
t = '/srv/pandora/pandora/config.jsonc'
|
||||
if os.path.exists(t):
|
||||
os.unlink(t)
|
||||
os.symlink(basename(target), t)
|
||||
|
||||
for root, folders, files in os.walk(join(base, 'scripts')):
|
||||
for f in files:
|
||||
src = join(root, f)
|
||||
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)
|
||||
|
||||
#todo
|
||||
#custom python module etc
|
||||
#local_settings.py?
|
||||
|
Loading…
Reference in a new issue