mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
plinth: Add --version flag to print version and exit
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> [sunil: Drop string "version" from the output] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
bd656386b9
commit
2200a83579
@ -39,6 +39,8 @@ def parse_arguments():
|
||||
help='list package dependencies for essential modules')
|
||||
parser.add_argument('--list-apps', default=False, nargs='*',
|
||||
help='list apps')
|
||||
parser.add_argument('--version', action='store_true', default=None,
|
||||
help='show version and exit')
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
@ -125,6 +127,10 @@ def main():
|
||||
|
||||
adapt_config(arguments)
|
||||
|
||||
if arguments.version:
|
||||
print(f'FreedomBox {__version__}')
|
||||
sys.exit(0)
|
||||
|
||||
if arguments.list_dependencies is not False:
|
||||
log.default_level = 'ERROR'
|
||||
module_loader.load_modules()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user