From 1725e09f7ed717a656ca2c56caddcf31a0072733 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 13 Feb 2018 12:54:48 +0100 Subject: [PATCH] rename `fdroid server` to `fdroid deploy` and deprecate 'init' `fdroid server init` is has not been needed for a long time. And 'server' is the only subcommand that has its own subsubcommands. This turns it into only `fdroid deploy`, which does what `fdroid server update` does. This also changes the bash completion to use `fdroid deploy`. But the old `fdroid server update` and `fdroid server init` commands remain working. closes #264 --- completion/bash-completion | 6 +++--- fdroid | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/completion/bash-completion b/completion/bash-completion index 2d413641..2142534e 100644 --- a/completion/bash-completion +++ b/completion/bash-completion @@ -282,10 +282,10 @@ __complete_stats() { __complete_options } -__complete_server() { +__complete_deploy() { opts="-i -v -q" lopts="--identity-file --local-copy-dir --sync-from-local-copy-dir - --verbose --quiet --no-checksum update" + --verbose --quiet --no-checksum" __complete_options } @@ -316,6 +316,7 @@ __cmds=" \ btlog \ build \ checkupdates \ +deploy \ dscanner \ gpgsign \ import \ @@ -328,7 +329,6 @@ publish \ readmeta \ rewritemeta \ scanner \ -server \ signatures \ signindex \ stats \ diff --git a/fdroid b/fdroid index a66df6b1..ec9bae2c 100755 --- a/fdroid +++ b/fdroid @@ -34,6 +34,7 @@ commands = OrderedDict([ ("publish", _("Sign and place packages in the repo")), ("gpgsign", _("Add PGP signatures using GnuPG for packages in repo")), ("update", _("Update repo information for new packages")), + ("deploy", _("Interact with the repo HTTP server")), ("verify", _("Verify the integrity of downloaded packages")), ("checkupdates", _("Check for updates to applications")), ("import", _("Add a new application from its source code")), @@ -44,7 +45,7 @@ commands = OrderedDict([ ("scanner", _("Scan the source code of a package")), ("dscanner", _("Dynamically scan APKs post build")), ("stats", _("Update the stats of the repo")), - ("server", _("Interact with the repo HTTP server")), + ("server", _("Old, deprecated name for fdroid deploy")), ("signindex", _("Sign indexes created using update --nosign")), ("btlog", _("Update the binary transparency log for a URL")), ("signatures", _("Extract signatures from APKs")), @@ -122,6 +123,11 @@ def main(): logging.critical("Specifying --verbose and --quiet and the same time is silly") sys.exit(1) + # temporary workaround until server.py becomes deploy.py + if command == 'deploy': + command = 'server' + sys.argv.insert(1, 'update') + # Trick optparse into displaying the right usage when --help is used. sys.argv[0] += ' ' + command