From 0d766cef1c869630e42c3562921e1bca81ddd4a6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Mart=C3=AD?= Date: Sun, 22 Dec 2013 21:31:35 +0100 Subject: [PATCH] Don't do everything unless --all is given --- fdroidserver/build.py | 4 ++++ fdroidserver/install.py | 16 +++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/fdroidserver/build.py b/fdroidserver/build.py index d2239043..184584e7 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -833,6 +833,10 @@ def main(): global options, config options, args = parse_commandline() + if not args and not options.all: + print "If you really want to build all the apps, use --all" + sys.exit(1) + config = common.read_config(options) if config['build_server_always']: diff --git a/fdroidserver/install.py b/fdroidserver/install.py index 3f23a16b..a133ede5 100644 --- a/fdroidserver/install.py +++ b/fdroidserver/install.py @@ -48,6 +48,10 @@ def main(): help="Install all signed applications available") (options, args) = parser.parse_args() + if not args and not options.all: + print "If you really want to install all the signed apps, use --all" + sys.exit(1) + config = common.read_config(options) output_dir = 'repo' @@ -74,16 +78,10 @@ def main(): if not apk: raise Exception("No signed apk available for %s" % appid) - elif options.all: - - for apkfile in sorted(glob.glob(os.path.join(output_dir, '*.apk'))): - - appid, vercode = common.apknameinfo(apkfile) - apks[appid] = apkfile - else: - print "If you really want to install all the signed apps, use --all" - sys.exit(0) + + apks = { common.apknameinfo(apkfile)[0] : apkfile for apkfile in + sorted(glob.glob(os.path.join(output_dir, '*.apk'))) } for appid, apk in apks.iteritems(): # Get device list each time to avoid device not found errors -- 2.30.2