1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-19 21:30:10 +01:00

Adapt rewritemeta

This commit is contained in:
Daniel Martí 2013-12-19 22:59:32 +01:00
parent 61def95320
commit b4b2e74082
2 changed files with 13 additions and 12 deletions

View File

@ -78,7 +78,7 @@ __complete_options() {
} }
__complete_build() { __complete_build() {
opts="-h -v -p -c -l -s -t -f" opts="-h -v -c -l -s -t -f"
lopts="--help --verbose --latest --server --resetserver --on-server lopts="--help --verbose --latest --server --resetserver --on-server
--force --all" --force --all"
case "${cur}" in case "${cur}" in
@ -137,7 +137,7 @@ __complete_publish() {
} }
__complete_checkupdates() { __complete_checkupdates() {
opts="-h -v -p" opts="-h -v"
lopts="--help --verbose --auto --autoonly --commit --gplay" lopts="--help --verbose --auto --autoonly --commit --gplay"
case "${cur}" in case "${cur}" in
-*) -*)
@ -162,14 +162,16 @@ __complete_import() {
} }
__complete_rewritemeta() { __complete_rewritemeta() {
opts="-h -v -p" opts="-h -v"
lopts="--help --verbose --package" lopts="--help --verbose"
case "${prev}" in case "${cur}" in
-p|--package) -*)
__complete_options
return 0;;
*)
__package __package
return 0;; return 0;;
esac esac
__complete_options
} }
__complete_scanner() { __complete_scanner() {

View File

@ -33,17 +33,16 @@ def main():
parser = OptionParser() parser = OptionParser()
parser.add_option("-v", "--verbose", action="store_true", default=False, parser.add_option("-v", "--verbose", action="store_true", default=False,
help="Spew out even more information than normal") help="Spew out even more information than normal")
parser.add_option("-p", "--package", default=None,
help="Process only the specified package")
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
config = common.read_config(options) config = common.read_config(options)
# Get all apps... # Get all apps...
apps = metadata.read_metadata(package=options.package, xref=False) allapps = metadata.read_metadata(xref=False)
apps = common.read_app_args(args, allapps, False)
if len(apps) == 0 and options.package: if len(apps) == 0:
print "No such package" print "No packages to rewrite"
sys.exit(1) sys.exit(1)
for app in apps: for app in apps: