aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn/cp.py
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2016-10-17 11:51:11 -0400
committerGravatar Mike Klein <mtklein@chromium.org>2016-10-17 16:16:16 +0000
commit1a8d675148ad92a2f67c075d4f5ca856f416df2a (patch)
treee96f348e25255ef021a69e201765bb05adae5f97 /gn/cp.py
parentc7a46650bc746311cbb10bd3f5426f5d0cb6c801 (diff)
GN: get Angle compiling on Windows.
Angle does not yet link, but it does compile. I chickened out and wrote cp.py to be the copy tool on Windows. I've got all platforms using it for consistency. CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-ANGLE-Trybot GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3533 Change-Id: I15f4b63a47121528b2fd2672c26c62765966147c Reviewed-on: https://skia-review.googlesource.com/3533 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'gn/cp.py')
-rw-r--r--gn/cp.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/gn/cp.py b/gn/cp.py
new file mode 100644
index 0000000000..eedfcb2c7e
--- /dev/null
+++ b/gn/cp.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 Google Inc.
+#
+# 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
+
+src, dst = sys.argv[1:]
+
+if os.path.exists(dst):
+ if os.path.isdir(dst):
+ shutil.rmtree(dst)
+ else:
+ os.remove(dst)
+
+if os.path.isdir(src):
+ shutil.copytree(src, dst)
+else:
+ shutil.copy2(src, dst)