fix install
This commit is contained in:
parent
440e5e5a86
commit
272810b9c2
1 changed files with 5 additions and 2 deletions
|
@ -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'):
|
||||||
|
|
Loading…
Reference in a new issue