fix install

This commit is contained in:
j 2018-11-05 20:26:47 +00:00
parent 440e5e5a86
commit 272810b9c2

View file

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