#!/usr/bin/python
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import os
import shutil
import sys

"""Copy Sources

Copy from a source file or directory to a new file or directory.  This
supports renaming of the file.
"""

def ErrOut(text):
  print '\n\n'
  print ' '.join(sys.argv)
  print text
  sys.exit(1)


def MakeDir(outdir):
  if outdir and not os.path.exists(outdir):
    os.makedirs(outdir)


def Main(argv):
  if len(argv) != 3:
    print 'Expecting: copy_sources.py <source file> <dest file/dir>'
    return 1

  if not os.path.exists(argv[1]):
    print 'File not found: %s' % argv[1]
    return 1

  shutil.copy(argv[1], argv[2])
  return 0

if __name__ == '__main__':
  sys.exit(Main(sys.argv))


#!/usr/bin/python
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import os
import shutil
import sys

"""Copy Sources

Copy from a source file or directory to a new file or directory.  This
supports renaming of the file.
"""

def ErrOut(text):
  print '\n\n'
  print ' '.join(sys.argv)
  print text
  sys.exit(1)


def MakeDir(outdir):
  if outdir and not os.path.exists(outdir):
    os.makedirs(outdir)


def Main(argv):
  if len(argv) != 3:
    print 'Expecting: copy_sources.py <source file> <dest file/dir>'
    return 1

  if not os.path.exists(argv[1]):
    print 'File not found: %s' % argv[1]
    return 1

  shutil.copy(argv[1], argv[2])
  print 'From %s to %s\n' % (argv[1], argv[2])
  return 0

if __name__ == '__main__':
  sys.exit(Main(sys.argv))


Add information on Copy command.
Add information on Copy command.

Adding extra information to track down mysterious mac build failures.

tbr=bradnelson@google.com

git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@9679 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
