From f2346ce5f08dc93aa9a37dca35d29e948d0bf5fe Mon Sep 17 00:00:00 2001 From: Melon Bread Date: Tue, 16 Oct 2018 00:29:45 -0400 Subject: [PATCH] Added args to keep downloaded archives --- README.md | 2 +- RetroUFO.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 79a3e96..ba0125e 100644 --- a/README.md +++ b/README.md @@ -22,4 +22,4 @@ It will then download and extract all the (latest version) of each core to: `~/ - Choose which architecture you are downloading format - Choose what platform you are downloading format - Download progress bar -- Keep downloaded archives +- ~~Keep downloaded archives~~ diff --git a/RetroUFO.py b/RetroUFO.py index 492fc04..139f612 100644 --- a/RetroUFO.py +++ b/RetroUFO.py @@ -24,8 +24,8 @@ def main(args): """ Where the magic happens """ download_cores() extract_cores() - clean_up() - pass + if not args.keep: + clean_up() def download_cores(): @@ -82,6 +82,9 @@ if __name__ == "__main__": """ This is executed when run from the command line """ parser = argparse.ArgumentParser() + parser.add_argument('-k', '--keep', action='store_true', + help='Keeps downloaded core archives') + args = parser.parse_args() main(args) pass