diff --git a/src/loaih/build.py b/src/loaih/build.py index 29bf940..28e1a1d 100644 --- a/src/loaih/build.py +++ b/src/loaih/build.py @@ -36,7 +36,8 @@ class Build(): LANGBASIC = [ 'en-GB' ] ARCHSTD = [ 'x86', 'x86_64' ] - def __init__(self, version: loaih.Version, arch): + def __init__(self, version: loaih.Version, arch, debug=False): + self.debug = debug self.version = version self.tidy_folder = True self.verbose = True @@ -651,5 +652,6 @@ class Build(): def __del__(self): """Destructor""" - # Cleaning up build directory - shutil.rmtree(self.builddir) + if not self.debug: + # Cleaning up build directory + shutil.rmtree(self.builddir) diff --git a/src/loaih/script.py b/src/loaih/script.py index 2bcc386..68bc536 100644 --- a/src/loaih/script.py +++ b/src/loaih/script.py @@ -90,6 +90,7 @@ def build(arch, language, offline, portable, updatable, download_path, repo_path for myquery in queries: for appbuild in loaih.build.Collection(myquery, arches): # Configuration phase + appbuild.debug = debug appbuild.tidy_folder = False appbuild.language = language appbuild.offline_help = offline @@ -111,8 +112,7 @@ def build(arch, language, offline, portable, updatable, download_path, repo_path appbuild.checksums() appbuild.publish() - if not debug: - del appbuild + del appbuild if not keep: shutil.rmtree(downloadpath)