fix install

This commit is contained in:
j 2018-11-05 20:26:47 +00:00
parent 440e5e5a86
commit 272810b9c2
1 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/python
#!/usr/bin/python3
import re
import os
from os.path import join, abspath, basename, dirname
@ -45,11 +45,14 @@ os.symlink(basename(target), t)
for root, folders, files in os.walk(join(base, 'scripts')):
for f in files:
if f.endswith('.pyc'):
continue
src = join(root, f)
target = src.replace(base, '/srv/pandora')
rel_src = os.path.relpath(src, dirname(target))
if os.path.exists(target) or os.path.islink(target):
os.unlink(target)
print(rel_src, target)
os.symlink(rel_src, target)
if os.path.exists('__init__.py'):