diff options
-rwxr-xr-x | src/leap/bitmask/cli/bitmask_cli.py | 1 | ||||
-rw-r--r-- | src/leap/bitmask/gui/app.py | 32 |
2 files changed, 25 insertions, 8 deletions
diff --git a/src/leap/bitmask/cli/bitmask_cli.py b/src/leap/bitmask/cli/bitmask_cli.py index 40f119e9..b048bb69 100755 --- a/src/leap/bitmask/cli/bitmask_cli.py +++ b/src/leap/bitmask/cli/bitmask_cli.py @@ -62,7 +62,6 @@ GENERAL COMMANDS: OPTIONAL ARGUMENTS: --json print the raw json (useful for scripting) - ''' epilog = ("Use 'bitmaskctl <command> help' to learn more " "about each command.") diff --git a/src/leap/bitmask/gui/app.py b/src/leap/bitmask/gui/app.py index 4a62adf6..d52636c2 100644 --- a/src/leap/bitmask/gui/app.py +++ b/src/leap/bitmask/gui/app.py @@ -223,6 +223,19 @@ def launch_gui(with_window=True): sys.exit(qApp.exec_()) +usage = '''bitmask [<args>] + +Launches the Bitmask GUI. + +OPTIONAL ARGUMENTS: + + --nowindow does not launch the main window, only the systray. + +SEE ALSO: + + bitmaskctl controls bitmask daemon from the command line. +''' + def start_app(): from leap.bitmask.util import STANDALONE @@ -242,13 +255,18 @@ def start_app(): MIN_ARGS = 1 # DEBUG ==================================== - if STANDALONE and len(sys.argv) > MIN_ARGS: - if sys.argv[1] == 'bitmask_helpers': - from leap.bitmask.vpn.helpers import main - return main() - - from leap.bitmask.cli import bitmask_cli - return bitmask_cli.main() + if len(sys.argv) > MIN_ARGS: + if STANDALONE: + if sys.argv[1] == 'bitmask_helpers': + from leap.bitmask.vpn.helpers import main + return main() + + from leap.bitmask.cli import bitmask_cli + return bitmask_cli.main() + else: + if sys.argv[1] == '--help' or sys.argv[1] == 'help': + print(usage) + sys.exit() reset_authtoken() with_window = '--nowindow' not in sys.argv |