def METHOD_NAME(argv):
    args = ParseArgs(argv)
    if not ValidateArgs(args):
        return -1
    if args.gn:
        SourcesToGN(args.gn_paths)
        return 0
    if args.exclude_patterns == None:
        CopyTree(args.copy_from, args.to)
    else:
        patterns = args.exclude_patterns.split(',')
        CopyTree(
            args.copy_from, args.to, ignore=shutil.ignore_patterns(*patterns))
    return 0