mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
Don't do everything unless --all is given
This commit is contained in:
parent
087cd6d135
commit
0d766cef1c
2 changed files with 11 additions and 9 deletions
|
|
@ -833,6 +833,10 @@ def main():
|
||||||
global options, config
|
global options, config
|
||||||
|
|
||||||
options, args = parse_commandline()
|
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)
|
config = common.read_config(options)
|
||||||
|
|
||||||
if config['build_server_always']:
|
if config['build_server_always']:
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,10 @@ def main():
|
||||||
help="Install all signed applications available")
|
help="Install all signed applications available")
|
||||||
(options, args) = parser.parse_args()
|
(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)
|
config = common.read_config(options)
|
||||||
|
|
||||||
output_dir = 'repo'
|
output_dir = 'repo'
|
||||||
|
|
@ -74,16 +78,10 @@ def main():
|
||||||
if not apk:
|
if not apk:
|
||||||
raise Exception("No signed apk available for %s" % appid)
|
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:
|
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():
|
for appid, apk in apks.iteritems():
|
||||||
# Get device list each time to avoid device not found errors
|
# Get device list each time to avoid device not found errors
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue