From e300d640481a25c67840e5318e653d9049e7b52d Mon Sep 17 00:00:00 2001 From: Francisco Redondo Marchena Date: Tue, 12 Aug 2014 17:00:55 +0000 Subject: WIP: Add systems and clusters properly --- scripts/migrate-chunks | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/migrate-chunks b/scripts/migrate-chunks index 3c01d0c2..ef393e9f 100755 --- a/scripts/migrate-chunks +++ b/scripts/migrate-chunks @@ -102,12 +102,14 @@ 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) + 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) - #new_location = os.path.join(subdir, morph.filename) - #subprocess.call(['git', 'mv', morph.filename, new_location]) - #morph.filename = new_location - #subprocess.call(['git', 'commit', '--quiet', '-m', - # 'Move %s into %s' %(morph['name'] + '.morph', directory)]) + subprocess.call(['git', 'add', morph.filename) + subprocess.call(['git', 'commit', '--quiet', '-m', + 'Move %s into %s' %(morph['name'] + '.morph', directory)]) + sys.exit(0) def move_clusters(morphs): kind = 'system' @@ -158,7 +160,7 @@ def download_chunks(morph): fixed_chunk['description'] = fixed_chunk.pop('comments') loader.save_to_file(chunk['morph'], fixed_chunk) print "Downloading %s from %s and placing in %s" %(name, repo, chunk['morph']) - subprocess.call(['git', 'add', chunk['morph']]) + #subprocess.call(['git', 'add', chunk['morph']]) #subprocess.call(['git', 'commit', '--quiet', '-m', # 'Add %s to definitions repository' % name]) if "buildsystem" in str(err): -- cgit v1.2.1