def main()

in remove-apache-license-identifier.py [0:0]


def main():
    args = parser().parse_args()
    configure_logging(args)

    paths = find_apache_references(args.proofdir)

    if not args.remove:
        if paths:
            print("The following files contain references to the Apache license:")
            for path in paths:
                print(f"  {path}")
            script = os.path.basename(sys.argv[0])
            print(f"Remove Apache references from these files with '{script} --remove'")
        exit(0)

    remove_apache_references(paths)

    paths = find_apache_references(args.proofdir)
    if paths:
        logging.warning("Files left unchanged contain Apache references: %s", ', '.join(paths))
        exit(1)

    exit(0)