2012-04-23 07:24:12 +04:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
2011-11-10 01:55:09 +04:00
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
2012-04-23 07:24:12 +04:00
|
|
|
"""Copy a file.
|
2011-11-10 01:55:09 +04:00
|
|
|
|
|
|
|
This module works much like the cp posix command - it takes 2 arguments:
|
|
|
|
(src, dst) and copies the file with path |src| to |dst|.
|
|
|
|
"""
|
|
|
|
|
2013-04-30 05:57:11 +04:00
|
|
|
import os
|
2012-04-23 07:24:12 +04:00
|
|
|
import shutil
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
2011-11-10 01:55:09 +04:00
|
|
|
def Main(src, dst):
|
2012-07-14 01:27:03 +04:00
|
|
|
# Use copy instead of copyfile to ensure the executable bit is copied.
|
2013-04-30 05:57:11 +04:00
|
|
|
return shutil.copy(src, os.path.normpath(dst))
|
2011-11-10 01:55:09 +04:00
|
|
|
|
2012-04-23 07:24:12 +04:00
|
|
|
|
2011-11-10 01:55:09 +04:00
|
|
|
if __name__ == '__main__':
|
|
|
|
sys.exit(Main(sys.argv[1], sys.argv[2]))
|