michael@0: #!/usr/bin/env python michael@0: # Copyright (c) 2012 The Chromium Authors. All rights reserved. michael@0: # Use of this source code is governed by a BSD-style license that can be michael@0: # found in the LICENSE file. michael@0: michael@0: """Copy a file. michael@0: michael@0: This module works much like the cp posix command - it takes 2 arguments: michael@0: (src, dst) and copies the file with path |src| to |dst|. michael@0: """ michael@0: michael@0: import shutil michael@0: import sys michael@0: michael@0: michael@0: def Main(src, dst): michael@0: # Use copy instead of copyfile to ensure the executable bit is copied. michael@0: return shutil.copy(src, dst) michael@0: michael@0: michael@0: if __name__ == '__main__': michael@0: sys.exit(Main(sys.argv[1], sys.argv[2]))