diff --git a/generate.py b/generate.py index 7bd11a1..7ee6f1a 100755 --- a/generate.py +++ b/generate.py @@ -115,12 +115,17 @@ def main(): makefile = os.path.join(template_path, 'Makefile') cpp = os.path.join(template_path, 'experiment.cpp') + try: + output_path = experiment['output'] + except KeyError: + output_path = cwd + print('[{}/{}] Creating experiment {}:'.format(num + 1, len(args.description), experiment['name']), file=sys.stderr) - experiment_dir = os.path.join(cwd, experiment['name']) + experiment_dir = os.path.join(output_path, experiment['name']) # Create folder print('Create folder…', experiment_dir, file=sys.stderr)