#!/usr/bin/env python
"""LICENSE
Copyright 2017 Hermann Krumrey <hermann@krumreyh.com>

This file is part of install-scripts.

install-scripts 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.

install-scripts 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 install-scripts.  If not, see <http://www.gnu.org/licenses/>.
LICENSE"""

import argparse
from install_scripts.configs import APPLICATION_CONFIGS, MACHINE_CONFIGS,\
    execute_config


def main():
    """
    Installs the essentials for the selected platform
    :return: None
    """
    options = set(MACHINE_CONFIGS.keys())
    options.update(set(APPLICATION_CONFIGS.keys()))

    parser = argparse.ArgumentParser()
    parser.add_argument("config",
                        choices=options,
                        help="The configuration to install")
    config = parser.parse_args().config

    execute_config(config)


if __name__ == "__main__":
    main()
