From 685b0f4e1b472ea1827c7b2e8ec26ed1a8db97b9 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Thu, 12 Oct 2023 20:47:08 +0200 Subject: [PATCH] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- bin/pwnagotchi | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/bin/pwnagotchi b/bin/pwnagotchi index 9d36a06a..9a00de20 100755 --- a/bin/pwnagotchi +++ b/bin/pwnagotchi @@ -97,37 +97,37 @@ def do_auto_mode(agent): if __name__ == '__main__': - parser = argparse.ArgumentParser() + parent_parser = argparse.ArgumentParser() - parser.add_argument('-C', '--config', action='store', dest='config', default='/etc/pwnagotchi/default.toml', + parent_parser.add_argument('-C', '--config', action='store', dest='config', default='/etc/pwnagotchi/default.toml', help='Main configuration file.') - parser.add_argument('-U', '--user-config', action='store', dest='user_config', default='/etc/pwnagotchi/config.toml', + parent_parser.add_argument('-U', '--user-config', action='store', dest='user_config', default='/etc/pwnagotchi/config.toml', help='If this file exists, configuration will be merged and this will override default values.') - parser.add_argument('--manual', dest="do_manual", action="store_true", default=False, help="Manual mode.") - parser.add_argument('--skip-session', dest="skip_session", action="store_true", default=False, + parent_parser.add_argument('--manual', dest="do_manual", action="store_true", default=False, help="Manual mode.") + parent_parser.add_argument('--skip-session', dest="skip_session", action="store_true", default=False, help="Skip last session parsing in manual mode.") - parser.add_argument('--clear', dest="do_clear", action="store_true", default=False, + parent_parser.add_argument('--clear', dest="do_clear", action="store_true", default=False, help="Clear the ePaper display and exit.") - parser.add_argument('--debug', dest="debug", action="store_true", default=False, + parent_parser.add_argument('--debug', dest="debug", action="store_true", default=False, help="Enable debug logs.") - parser.add_argument('--version', dest="version", action="store_true", default=False, + parent_parser.add_argument('--version', dest="version", action="store_true", default=False, help="Print the version.") - parser.add_argument('--print-config', dest="print_config", action="store_true", default=False, + parent_parser.add_argument('--print-config', dest="print_config", action="store_true", default=False, help="Print the configuration.") # Jayofelony added these - parser.add_argument('--check-update', dest="check_update", action="store_true", default=False, + parent_parser.add_argument('--check-update', dest="check_update", action="store_true", default=False, help="Check for updates on Pwnagotchi. And tells current version.") - parser.add_argument('--donate', dest="donate", action="store_true", default=False, + parent_parser.add_argument('--donate', dest="donate", action="store_true", default=False, help="How to donate to this project.") # sub parser plugins - parser = plugins_cmd.add_parsers(parser) + parser = plugins_cmd.add_parsers(parent_parser) args = parser.parse_args() if plugins_cmd.used_plugin_cmd(args):