From 335351a20e11523c3d8af2e2cdcfde2a6193fe2f Mon Sep 17 00:00:00 2001 From: alichinese Date: Thu, 20 Jun 2024 16:03:40 +0800 Subject: [PATCH] main: optimize the one-click * the build directory use build.yaml file name Signed-off-by: alichinese --- src/oebuild/app/main.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/oebuild/app/main.py b/src/oebuild/app/main.py index 10cfef6..6975bfc 100644 --- a/src/oebuild/app/main.py +++ b/src/oebuild/app/main.py @@ -94,7 +94,12 @@ class OebuildApp: ''' parser = OebuildArgumentParser( - prog='oebuild', description='The openEuler Embedded meta-tool.', + prog='oebuild', + description='''The openEuler Embedded meta-tool. you can directly run +oebuild in oebuild workspace to perform the build, for example: + +oebuild qemu-aarch64-ros.yaml + ''', epilog='''Run "oebuild -h" for help on each .''', add_help=False, oebuild_app=self ) @@ -220,7 +225,11 @@ class QuickBuild(): self.workdir = Configure().oebuild_topdir() self._check_yaml() - self.build_dir = self.compile_param.machine + if "compile.yaml" in os.listdir(): + self.build_dir = os.path.basename(os.getcwd()) + else: + build_name = self.build_yaml_path.name.replace(".yaml", "").replace(".yml", "") + self.build_dir = os.path.basename(build_name) self.generate() -- Gitee