From 519da08557ddb6f535f60325c9e2df1d551b3c5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fra=C3=9F?= Date: Wed, 2 Jul 2025 16:28:05 +0200 Subject: [PATCH] [mod] tool:build:place conf --- tools/build | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/tools/build b/tools/build index 25bfa98..4921e92 100755 --- a/tools/build +++ b/tools/build @@ -15,12 +15,21 @@ import sys as _sys import os as _os +import shutil as _shutil import argparse as _argparse def main(): ## args argument_parser = _argparse.ArgumentParser() + argument_parser.add_argument( + "-o", + "--output-directory", + type = str, + default = "/tmp/espe", + metavar = "", + help = "output directory", + ) argument_parser.add_argument( "-t", "--tests", @@ -29,12 +38,12 @@ def main(): help = "whether to also build the test routines", ) argument_parser.add_argument( - "-o", - "--output-directory", + "-c", + "--conf-path", type = str, - default = "/tmp/espe", - metavar = "", - help = "output directory", + default = "", + metavar = "", + help = "path to conf file to be put", ) args = argument_parser.parse_args() @@ -50,6 +59,11 @@ def main(): " ".join(targets), ) ) + if (args.conf_path != ""): + _shutil.copyfile( + args.conf_path, + _os.path.join(args.output_directory, "conf.json") + ) _sys.stdout.write("%s\n" % args.output_directory)