2024-09-12 00:02:12 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
import sys as _sys
|
|
|
|
import os as _os
|
|
|
|
import argparse as _argparse
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
## args
|
|
|
|
argument_parser = _argparse.ArgumentParser()
|
|
|
|
argument_parser.add_argument(
|
|
|
|
"-o",
|
|
|
|
"--output-directory",
|
|
|
|
type = str,
|
2024-10-25 10:30:20 +02:00
|
|
|
default = "/tmp/dali",
|
2024-09-12 00:02:12 +02:00
|
|
|
metavar = "<output-directory>",
|
|
|
|
help = "output directory",
|
|
|
|
)
|
|
|
|
argument_parser.add_argument(
|
|
|
|
"-c",
|
|
|
|
"--conf-path",
|
|
|
|
type = str,
|
|
|
|
default = None,
|
|
|
|
metavar = "<conf-path>",
|
|
|
|
help = "conf path",
|
|
|
|
)
|
|
|
|
args = argument_parser.parse_args()
|
|
|
|
|
|
|
|
## exec
|
|
|
|
targets = []
|
|
|
|
targets.append("default")
|
|
|
|
_os.system(
|
|
|
|
"make dir_build=%s --file=tools/makefile %s"
|
|
|
|
% (
|
|
|
|
args.output_directory,
|
|
|
|
" ".join(targets),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
if True:
|
|
|
|
if (args.conf_path is None):
|
|
|
|
pass
|
|
|
|
else:
|
|
|
|
_os.system(
|
|
|
|
"cp %s %s/conf.json"
|
|
|
|
% (
|
|
|
|
args.conf_path,
|
|
|
|
args.output_directory,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
_sys.stdout.write("%s\n" % args.output_directory)
|
|
|
|
|
|
|
|
|
|
|
|
main()
|
|
|
|
|