From: Daniel Martí Date: Sun, 22 Dec 2013 20:31:35 +0000 (+0100) Subject: Don't do everything unless --all is given X-Git-Tag: 0.1~87 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0d766cef1c869630e42c3562921e1bca81ddd4a6;p=fdroidserver.git Don't do everything unless --all is given --- 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