Mercurial > mxe-octave
changeset 4102:3e78f9bcd779
pkg-install: add -no-cleanup option
* tools/pkg-install.py: add a no cleanup option to not delete temp files after building package
author | John Donoghue |
---|---|
date | Mon, 14 Mar 2016 08:09:34 -0400 |
parents | 29456c29200c |
children | 71ca5e0790a0 |
files | tools/pkg-install.py |
diffstat | 1 files changed, 14 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/pkg-install.py Fri Mar 11 07:05:44 2016 -0500 +++ b/tools/pkg-install.py Mon Mar 14 08:09:34 2016 -0400 @@ -13,15 +13,15 @@ octave_config = "octave-config"; make = "make" verbose = True; - prefix = "" - pkg = "" - arch = "" - tmp = "/tmp" - apiversion = "" - bin_dir = "" - m_dir = "" - arch_dir = "" - config_opts = "" + prefix = ""; + pkg = ""; + arch = ""; + tmp = "/tmp"; + apiversion = ""; + bin_dir = ""; + m_dir = ""; + arch_dir = ""; + cleanup = False; def show_usage(): print sys.argv(0), "[options] pkg1 [pkg2]" @@ -330,7 +330,9 @@ if env.verbose: print "cleaning up" os.chdir(currdir) - shutil.rmtree(tmpdir) + + if env.cleanup: + shutil.rmtree(tmpdir) def pkg (args): @@ -353,6 +355,8 @@ env.verbose = True; elif key == "--verbose": env.verbose = True; + elif key == "-no-cleanup": + env.cleanup = False; elif val == "": files.append(key)