[mod] tool:build:place conf
This commit is contained in:
parent
7f447d3771
commit
519da08557
1 changed files with 19 additions and 5 deletions
24
tools/build
24
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 = "<output-directory>",
|
||||
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 = "<output-directory>",
|
||||
help = "output directory",
|
||||
default = "",
|
||||
metavar = "<conf-path>",
|
||||
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)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue