summaryrefslogtreecommitdiff
path: root/scripts/migrate-chunks
diff options
context:
space:
mode:
authorFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2014-08-12 17:15:59 +0000
committerFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2014-08-12 17:15:59 +0000
commit627407959852d088df01f15122fb87e753ca5b75 (patch)
tree71f88d1a85cdfdd4aa587ad837a02743bfc253aa /scripts/migrate-chunks
parent5408fb60ed838c996386007d4ce846abc93cc6d0 (diff)
downloaddefinitions-627407959852d088df01f15122fb87e753ca5b75.tar.gz
WIP: Add commit when change morph fields or system fields
Diffstat (limited to 'scripts/migrate-chunks')
-rwxr-xr-xscripts/migrate-chunks5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/migrate-chunks b/scripts/migrate-chunks
index 8be928c0..7ab49803 100755
--- a/scripts/migrate-chunks
+++ b/scripts/migrate-chunks
@@ -102,10 +102,13 @@ def move_morphologies(morphs, kind, directory, path):
for submorph in morph[morph_dir[kind]]:
submorph['morph'] = sanitise_morphology_path(submorph['morph'], kind)
print 'Moving %s into %s' % (morph.filename, directory)
+ loader.save_to_file(morph.filename, morph)
+ subprocess.call(['git', 'add', morph.filename])
+ subprocess.call(['git', 'commit', '--quiet', '-m',
+ 'Add morphology paths to %s' %(morph['name'] + '.morph'])
new_location = os.path.join(subdir, morph.filename)
subprocess.call(['git', 'mv', morph.filename, new_location])
morph.filename = new_location
- loader.save_to_file(morph.filename, morph)
subprocess.call(['git', 'add', morph.filename])
subprocess.call(['git', 'commit', '--quiet', '-m',
'Move %s into %s' %(morph['name'] + '.morph', directory)])