mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
parent
dc723e7108
commit
ea9299f216
1 changed files with 23 additions and 4 deletions
|
@ -449,7 +449,9 @@ def main():
|
||||||
global config, options, json_per_build
|
global config, options, json_per_build
|
||||||
|
|
||||||
# Parse command line...
|
# Parse command line...
|
||||||
parser = ArgumentParser(usage="%(prog)s [options] [APPID[:VERCODE] [APPID[:VERCODE] ...]]")
|
parser = ArgumentParser(
|
||||||
|
usage="%(prog)s [options] [APPID[:VERCODE] path/to.apk ...]"
|
||||||
|
)
|
||||||
common.setup_global_opts(parser)
|
common.setup_global_opts(parser)
|
||||||
parser.add_argument("appid", nargs='*', help=_("application ID with optional versionCode in the form APPID[:VERCODE]"))
|
parser.add_argument("appid", nargs='*', help=_("application ID with optional versionCode in the form APPID[:VERCODE]"))
|
||||||
parser.add_argument("-f", "--force", action="store_true", default=False,
|
parser.add_argument("-f", "--force", action="store_true", default=False,
|
||||||
|
@ -469,11 +471,28 @@ def main():
|
||||||
|
|
||||||
config = common.read_config(options)
|
config = common.read_config(options)
|
||||||
|
|
||||||
|
probcount = 0
|
||||||
|
|
||||||
|
appids = []
|
||||||
|
for apk in options.appid:
|
||||||
|
if os.path.isfile(apk):
|
||||||
|
count = scan_binary(apk)
|
||||||
|
if count > 0:
|
||||||
|
logging.warning(
|
||||||
|
_('Scanner found {count} problems in {apk}:').format(
|
||||||
|
count=count, apk=apk
|
||||||
|
)
|
||||||
|
)
|
||||||
|
probcount += count
|
||||||
|
else:
|
||||||
|
appids.append(apk)
|
||||||
|
|
||||||
|
if not appids:
|
||||||
|
return
|
||||||
|
|
||||||
# Read all app and srclib metadata
|
# Read all app and srclib metadata
|
||||||
allapps = metadata.read_metadata()
|
allapps = metadata.read_metadata()
|
||||||
apps = common.read_app_args(options.appid, allapps, True)
|
apps = common.read_app_args(appids, allapps, True)
|
||||||
|
|
||||||
probcount = 0
|
|
||||||
|
|
||||||
build_dir = 'build'
|
build_dir = 'build'
|
||||||
if not os.path.isdir(build_dir):
|
if not os.path.isdir(build_dir):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue