summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2014-08-05 14:26:14 +0000
committerFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2014-08-05 14:30:02 +0000
commitff5016fb52632a4ee2120448a3b123552ab32f9f (patch)
tree3d3bd6889c531a82dd91799f789d285fe9c9cf07
parent6910800c66f5733a66ed04d3d30c036ef36ce4f6 (diff)
downloaddefinitions-ff5016fb52632a4ee2120448a3b123552ab32f9f.tar.gz
WIP: For testing systems and clusters
-rwxr-xr-xscripts/migrate-chunks10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/migrate-chunks b/scripts/migrate-chunks
index 28fad3c9..8faee493 100755
--- a/scripts/migrate-chunks
+++ b/scripts/migrate-chunks
@@ -51,9 +51,9 @@ def move_morphs(morphs, kind):
subdir = os.path.join(definitions_repo, 'system')
subprocess.call(['mkdir','-p', subdir])
for morph in morphs:
- print 'Initial: %s' % str(morph)
- sys.exit(0)
- morph['systems'][0]['morph'] = str( 'strata/' + morph['strata'][0]['morph'] + '.morph')
+ #print 'Initial: %s' % str(morph)
+ for stratum in morph['strata']:
+ stratum['morph'] = str('strata/' + stratum['morph'] + '.morph')
new_morph = loader.parse_morphology_text(str(morph), morph.filename)
loader.save_to_file(morph.filename,new_morph)
new_location = os.path.join(subdir, morph.filename)
@@ -76,8 +76,8 @@ def move_morphs(morphs, kind):
# 'Move %s into subdirectory' % kind]m
for key in morphologies.iterkeys():
- if key == 'system'
- move_morphs(morphologies[key], key)
+ if key in ['system', 'cluster'] :
+ move_morphs(morphologies[key], key)
#move_morphs(chunks, 'chunks')
#move_morphs(strata, 'strata')