2013-01-29 21:01:01 +05:30
|
|
|
#!/usr/bin/env python
|
2013-02-01 17:51:56 +05:30
|
|
|
import os
|
|
|
|
import damask
|
2013-01-29 21:01:01 +05:30
|
|
|
|
|
|
|
bin_link = { \
|
|
|
|
'.' : [
|
|
|
|
'DAMASK_spectral.exe',
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2013-12-19 19:07:35 +05:30
|
|
|
MarcReleases =[2011,2012,2013,2013.1]
|
2013-06-06 21:34:40 +05:30
|
|
|
|
2013-01-29 21:01:01 +05:30
|
|
|
damaskEnv = damask.Environment('../../') # script location relative to root
|
|
|
|
baseDir = damaskEnv.relPath('code/')
|
|
|
|
|
|
|
|
for dir in bin_link:
|
|
|
|
for file in bin_link[dir]:
|
|
|
|
src = os.path.abspath(os.path.join(baseDir,dir,file))
|
|
|
|
if os.path.exists(src):
|
|
|
|
sym_link = os.path.abspath(os.path.join(damaskEnv.binDir(),\
|
|
|
|
{True: dir,
|
|
|
|
False:os.path.splitext(file)[0]}[file == '']))
|
2013-02-14 00:15:49 +05:30
|
|
|
if os.path.lexists(sym_link): os.remove(sym_link)
|
2013-01-29 21:01:01 +05:30
|
|
|
os.symlink(src,sym_link)
|
|
|
|
print sym_link,'-->',src
|
2013-06-06 21:34:40 +05:30
|
|
|
|
|
|
|
|
|
|
|
for version in MarcReleases:
|
|
|
|
src = os.path.abspath(os.path.join(baseDir,'DAMASK_marc.f90'))
|
|
|
|
if os.path.exists(src):
|
|
|
|
sym_link = os.path.abspath(os.path.join(baseDir,'DAMASK_marc'+str(version)+'.f90'))
|
|
|
|
if os.path.lexists(sym_link): os.remove(sym_link)
|
|
|
|
os.symlink(src,sym_link)
|
|
|
|
print sym_link,'-->',src
|