This commit is contained in:
j 2016-11-29 22:02:48 +00:00
commit bca81caaa2
6 changed files with 13 additions and 13 deletions

View file

@ -3,7 +3,7 @@
import os
from os.path import join, abspath, basename, dirname
name = 'indymediauk'
name = 'amp'
base = abspath(dirname(__file__))
os.chdir(base)
@ -12,7 +12,7 @@ for root, folders, files in os.walk(join(base, 'static')):
src = join(root, f)
target = src.replace(base, '/srv/pandora')
rel_src = os.path.relpath(src, dirname(target))
if os.path.exists(target):
if os.path.exists(target) or os.path.islink(target):
os.unlink(target)
os.symlink(rel_src, target)
@ -48,7 +48,7 @@ for root, folders, files in os.walk(join(base, 'scripts')):
src = join(root, f)
target = src.replace(base, '/srv/pandora')
rel_src = os.path.relpath(src, dirname(target))
if os.path.exists(target):
if os.path.exists(target) or os.path.islink(target):
os.unlink(target)
os.symlink(rel_src, target)