#!/usr/bin/env python3
'''
Copyright (C) 2025 Vladimir Vaskov <rirusha@altlinux.org>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see
<https://www.gnu.org/licenses/gpl-3.0-standalone.html>.

SPDX-License-Identifier: GPL-3.0-or-later
'''


from riru_build_utils.args_parsers import build_parser
from riru_build_utils.args_parsers import clone_all_parser
from riru_build_utils.args_parsers import clone_parser
from riru_build_utils.args_parsers import compile_parser
from riru_build_utils.args_parsers import create_spec_parser
from riru_build_utils.args_parsers import init_parser
from riru_build_utils.args_parsers import install_deps_parser
from riru_build_utils.args_parsers import install_parser
from riru_build_utils.args_parsers import test_parser
from riru_build_utils.args_parsers import to_gear_parser
from riru_build_utils.args_parsers import uninstall_parser
from riru_build_utils.args_parsers import update_parser


def main():
    print(f'Riru Build Utils - 0.10.9')
    
    parsers = {
        'build': build_parser,
        'clone-all': clone_all_parser,
        'clone': clone_parser,
        'compile': compile_parser,
        'create-spec': create_spec_parser,
        'init': init_parser,
        'install-deps': install_deps_parser,
        'install': install_parser,
        'test': test_parser,
        'to-gear': to_gear_parser,
        'uninstall': uninstall_parser,
        'update': update_parser,
    }

    print('\nUsage:')
    
    for cmd, parser in parsers.items():
        print(f'    {parser.format_usage().replace('usage: rbu-help', f'rbu {cmd}')}', end='')

if __name__ == '__main__':
    main()
