[OE-core] [oe-core][PATCH 1/2] cleanup-workdir: add a method for getting the build dir
Lucas Dutra Nunes
ldnunes at ossystems.com.br
Mon May 18 20:08:17 UTC 2015
Signed-off-by: Lucas Dutra Nunes <ldnunes at ossystems.com.br>
---
scripts/cleanup-workdir | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/scripts/cleanup-workdir b/scripts/cleanup-workdir
index a7f5a3a..bf37f90 100755
--- a/scripts/cleanup-workdir
+++ b/scripts/cleanup-workdir
@@ -64,6 +64,9 @@ def get_cur_arch_dirs(workdir, arch_dirs):
m = re.match(pattern, output)
arch_dirs.append(m.group(1))
+def get_build_dir():
+ return run_command('echo $BUILDDIR').strip()
+
def main():
global parser
parser = optparse.OptionParser(
@@ -77,7 +80,7 @@ will be deleted. Be CAUTIOUS.""")
options, args = parser.parse_args(sys.argv)
- builddir = run_command('echo $BUILDDIR').strip()
+ builddir = get_build_dir()
if len(builddir) == 0:
err_quit("Please source file \"oe-init-build-env\" first.\n")
--
2.1.4
More information about the Openembedded-core
mailing list