improved symbolic linking and replace deprecated print syntax
This commit is contained in:
parent
6a71cf672c
commit
2346a0841e
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os
|
import os,sys
|
||||||
import damask
|
import damask
|
||||||
|
|
||||||
bin_link = { \
|
bin_link = { \
|
||||||
|
@ -35,7 +35,7 @@ for dir in bin_link:
|
||||||
False:os.path.splitext(file)[0]}[file == '']))
|
False:os.path.splitext(file)[0]}[file == '']))
|
||||||
if os.path.lexists(sym_link): os.remove(sym_link)
|
if os.path.lexists(sym_link): os.remove(sym_link)
|
||||||
os.symlink(src,sym_link)
|
os.symlink(src,sym_link)
|
||||||
print sym_link,'-->',src
|
sys.stdout.write(sym_link+' -> '+src+'\n')
|
||||||
|
|
||||||
|
|
||||||
for version in MarcReleases:
|
for version in MarcReleases:
|
||||||
|
@ -43,5 +43,6 @@ for version in MarcReleases:
|
||||||
if os.path.exists(src):
|
if os.path.exists(src):
|
||||||
sym_link = os.path.abspath(os.path.join(baseDir,'DAMASK_marc'+str(version)+'.f90'))
|
sym_link = os.path.abspath(os.path.join(baseDir,'DAMASK_marc'+str(version)+'.f90'))
|
||||||
if os.path.lexists(sym_link): os.remove(sym_link)
|
if os.path.lexists(sym_link): os.remove(sym_link)
|
||||||
os.symlink(src,sym_link)
|
os.symlink(os.path.relpath(src,baseDir),sym_link)
|
||||||
print sym_link,'-->',src
|
sys.stdout.write(sym_link+' -> '+src+'\n')
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
# Makes postprocessing routines acessible from everywhere.
|
# Makes postprocessing routines acessible from everywhere.
|
||||||
import os
|
import os,sys
|
||||||
from damask import Environment
|
from damask import Environment
|
||||||
|
|
||||||
BOLD = '\033[1m'
|
BOLD = '\033[1m'
|
||||||
|
@ -34,9 +34,9 @@ for subDir in processing_subDirs:
|
||||||
|
|
||||||
if os.path.lexists(sym_link):
|
if os.path.lexists(sym_link):
|
||||||
os.remove(sym_link)
|
os.remove(sym_link)
|
||||||
print sym_link,
|
sys.stdout.write(sym_link)
|
||||||
else:
|
else:
|
||||||
print BOLD + sym_link + ENDC,
|
sys.stdout.write(BOLD + sym_link + ENDC)
|
||||||
|
|
||||||
os.symlink(src,sym_link)
|
os.symlink(src,sym_link)
|
||||||
print '-->',src
|
sys.stdout.write(' -> '+src+'\n')
|
||||||
|
|
Loading…
Reference in New Issue