15 parser = argparse.ArgumentParser(
16 description=
'Removes existing files and installs the specified headers' +
17 'at the given location.'
21 '--headers', nargs=
'+', help=
'The headers to install at the location.', required=
True
23 parser.add_argument(
'--location', type=str, required=
True)
25 args = parser.parse_args()
29 shutil.rmtree(os.path.normpath(args.location))
30 except OSError
as err:
32 if err.errno != errno.ENOENT:
36 if not os.path.isdir(args.location):
37 os.makedirs(args.location)
40 for header_file
in args.headers:
41 shutil.copyfile(header_file, os.path.join(args.location, os.path.basename(header_file)))
44if __name__ ==
'__main__':