From 750307fcd927a97ba0637c643cba174167c6a194 Mon Sep 17 00:00:00 2001 From: Tobias Langer Date: Sat, 8 Oct 2016 22:12:21 +0200 Subject: [PATCH] More usability. --- generate.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) -- libgit2 0.26.0