[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 sys as _sys
|
||||||
import os as _os
|
import os as _os
|
||||||
|
import shutil as _shutil
|
||||||
import argparse as _argparse
|
import argparse as _argparse
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
## args
|
## args
|
||||||
argument_parser = _argparse.ArgumentParser()
|
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(
|
argument_parser.add_argument(
|
||||||
"-t",
|
"-t",
|
||||||
"--tests",
|
"--tests",
|
||||||
|
@ -29,12 +38,12 @@ def main():
|
||||||
help = "whether to also build the test routines",
|
help = "whether to also build the test routines",
|
||||||
)
|
)
|
||||||
argument_parser.add_argument(
|
argument_parser.add_argument(
|
||||||
"-o",
|
"-c",
|
||||||
"--output-directory",
|
"--conf-path",
|
||||||
type = str,
|
type = str,
|
||||||
default = "/tmp/espe",
|
default = "",
|
||||||
metavar = "<output-directory>",
|
metavar = "<conf-path>",
|
||||||
help = "output directory",
|
help = "path to conf file to be put",
|
||||||
)
|
)
|
||||||
args = argument_parser.parse_args()
|
args = argument_parser.parse_args()
|
||||||
|
|
||||||
|
@ -50,6 +59,11 @@ def main():
|
||||||
" ".join(targets),
|
" ".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)
|
_sys.stdout.write("%s\n" % args.output_directory)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue