now symlinking only to know extensions (cause trouble for temp files like *.py~ and the like)
This commit is contained in:
parent
ac3bd2d725
commit
6550729b49
|
@ -26,12 +26,13 @@ bin_link = ['pre','post','misc']
|
|||
for myDir in bin_link:
|
||||
myDir = os.path.abspath(os.path.join(baseDir,myDir))
|
||||
for myFile in os.listdir(myDir):
|
||||
src = os.path.abspath(os.path.join(myDir,myFile))
|
||||
sym_link = os.path.abspath(os.path.join(binDir,os.path.splitext(myFile)[0]))
|
||||
print sym_link,'-->',src
|
||||
if os.path.lexists(sym_link):
|
||||
os.remove(sym_link)
|
||||
os.symlink(src,sym_link)
|
||||
if os.path.splitext(myFile)[1] in ['.py']: #only link to know extension, otherwise .py.bak or somethink like that is uses
|
||||
src = os.path.abspath(os.path.join(myDir,myFile))
|
||||
sym_link = os.path.abspath(os.path.join(binDir,os.path.splitext(myFile)[0]))
|
||||
print sym_link,'-->',src
|
||||
if os.path.lexists(sym_link):
|
||||
os.remove(sym_link)
|
||||
os.symlink(src,sym_link)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue