rename
This commit is contained in:
parent
9283f28826
commit
bca81caaa2
6 changed files with 13 additions and 13 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue