# HG changeset patch # User John Donoghue # Date 1457957374 14400 # Node ID 3e78f9bcd779f6d2f95e65f66f49df6eb648f174 # Parent 29456c29200cae0d1ff5d8c230e67fce71620a2d pkg-install: add -no-cleanup option * tools/pkg-install.py: add a no cleanup option to not delete temp files after building package diff -r 29456c29200c -r 3e78f9bcd779 tools/pkg-install.py --- 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)