Ejemplo n.º 1
0
def print_banner(bootstrap, no_shell_file):
    """Print the Pigweed or project-specific banner"""
    enable_colors()

    print(Color.green('\n  WELCOME TO...'))
    print(Color.magenta(_PIGWEED_BANNER))

    if bootstrap:
        print(
            Color.green('\n  BOOTSTRAP! Bootstrap may take a few minutes; '
                        'please be patient'))
        print(
            Color.green(
                '  On Windows, this stage is extremely slow (~10 minutes).\n'))
    else:
        print(
            Color.green(
                '\n  ACTIVATOR! This sets your console environment variables.\n'
            ))

        if no_shell_file:
            print(Color.bold_red('Error!\n'))
            print(
                Color.red('  Your Pigweed environment does not seem to be'
                          ' configured.'))
            print(Color.red('  Run bootstrap.bat to perform initial setup.'))

    return 0
Ejemplo n.º 2
0
def main():
    """Script entry point."""
    if os.name != 'nt':
        return 1

    parser = argparse.ArgumentParser()
    parser.add_argument('--bootstrap', action='store_true')
    parser.add_argument('--no-shell-file', action='store_true')
    args = parser.parse_args()

    enable_colors()

    print(Color.green('\n  WELCOME TO...'))
    print(Color.magenta(_PIGWEED_BANNER))

    if args.bootstrap:
        print(
            Color.green('\n  BOOTSTRAP! Bootstrap may take a few minutes; '
                        'please be patient'))
        print(
            Color.green(
                '  On Windows, this stage is extremely slow (~10 minutes).\n'))
    else:
        print(
            Color.green(
                '\n  ACTIVATOR! This sets your console environment variables.\n'
            ))

        if args.no_shell_file:
            print(Color.bold_red('Error!\n'))
            print(
                Color.red('  Your Pigweed environment does not seem to be'
                          ' configured.'))
            print(Color.red('  Run bootstrap.bat to perform initial setup.'))

    return 0