#!/usr/bin/env python

import argparse
import sys

GENERATED_HEADER = """/*
 * This file is generated by copy_out.py from %s. DO NOT EDIT!
 */

"""

parser = argparse.ArgumentParser(description="Generate code")
parser.add_argument('-o', dest='output', required=True, type=argparse.FileType('w'))
parser.add_argument('input')

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

    args.output.write(GENERATED_HEADER % args.input)

    with open(args.input, 'r') as f:
        for line in f:
            args.output.write(line)
        args.output.close()


if __name__ == "__main__":
    main()
