simplified symlinking, using python list dir method, no need to update this script anymore

This commit is contained in:
Martin Diehl 2014-03-26 13:11:12 +00:00
parent 6387620659
commit 5c3e2f49d7
1 changed files with 6 additions and 84 deletions

View File

@ -20,91 +20,13 @@ if not os.path.isdir(binDir):
os.mkdir(binDir) os.mkdir(binDir)
#define ToDo list #define ToDo list
bin_link = { \ bin_link = ['pre','post','misc']
'pre' : [
'marc_addUserOutput.py',
'mentat_pbcOnBoxMesh.py',
'mentat_spectralBox.py',
'OIMang_hex2cub.py',
'patchFromReconstructedBoundaries.py',
'seeds_fromRandom.py',
'seeds_fromGeom.py',
'seeds_check.py',
'geom_fromAng.py',
'geom_fromVPSC.py',
'geom_fromEuclideanDistance.py',
'geom_fromMinimalSurface.py',
'geom_fromVoronoiTessellation.py',
'geom_fromOsteonGeometry.py',
'geom_addPrimitive.py',
'geom_canvas.py',
'geom_check.py',
'geom_rescale.py',
'geom_pack.py',
'geom_unpack.py',
'geom_translate.py',
'geom_vicinityOffset.py',
'geom_grainGrowth.py',
'geom_poke.py',
],
'post' : [
'3Dvisualize.py',
'permuteData.py',
'addCalculation.py',
'addCauchy.py',
'addCompatibilityMismatch.py',
'addCurl.py',
'addDeformedConfiguration.py',
'addDeterminant.py',
'addDeviator.py',
'addDivergence.py',
'addEhkl.py',
'addEuclideanDistance.py',
'addGrainID.py',
'addMises.py',
'addNorm.py',
'addOrientations.py',
'addIPFcolor.py',
'addPK2.py',
'addSchmidfactors.py',
'addSpectralDecomposition.py',
'addStrainTensors.py',
'averageDown.py',
'binXY.py',
'blowUp.py',
'stddevDown.py',
'deleteColumn.py',
'deleteInfo.py',
'filterTable.py',
'sortTable.py',
'marc_deformedGeometry.py',
'marc_extractData.py',
'mentat_colorMap.py',
'nodesFromCentroids.py',
'perceptualUniformColorMap.py',
'postResults.py',
'showTable.py',
'tagLabel.py',
'vtk2ang.py',
'vtk_addData.py',
'vtk_pointcloud.py',
'vtk_addPointcloudData.py',
'vtk_voxelcloud.py',
'vtk_addVoxelcloudData.py',
],
'misc' : [
'gwyddion_filter.py',
'vtk_fromGwyddion.py',
],
}
for dir in bin_link: for myDir in bin_link:
for file in bin_link[dir]: myDir = os.path.abspath(os.path.join(baseDir,myDir))
src = os.path.abspath(os.path.join(baseDir,dir,file)) for myFile in os.listdir(myDir):
if (file == ''): src = os.path.abspath(os.path.join(myDir,myFile))
sym_link = os.path.abspath(os.path.join(binDir,dir)) sym_link = os.path.abspath(os.path.join(binDir,os.path.splitext(myFile)[0]))
else:
sym_link = os.path.abspath(os.path.join(binDir,os.path.splitext(file)[0]))
print sym_link,'-->',src print sym_link,'-->',src
if os.path.lexists(sym_link): if os.path.lexists(sym_link):
os.remove(sym_link) os.remove(sym_link)