OLD | NEW |
| (Empty) |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 # This script removes the platform-specific GN binaries from tools/gn/bin* now | |
6 # that the binaries have been moved to src/buildtools. Keeping the old ones | |
7 # around will be pretty confusing since the version will be out-of-date. | |
8 # | |
9 # This script assumes it is located in tools/gn/bin and locates the binaries | |
10 # relative to itself. | |
11 # | |
12 # TODO(brettw) remove this script when people have likely been updated. | |
13 # End of July 2014 would be good. | |
14 | |
15 import os | |
16 import sys | |
17 | |
18 bin_dir = os.path.dirname(__file__) | |
19 | |
20 # Typically only one platform will have binaries. Remove them all just in case, | |
21 # but ignore all errors. | |
22 | |
23 try: | |
24 os.remove(os.path.join(bin_dir, "linux", "gn")) | |
25 except: | |
26 pass | |
27 | |
28 try: | |
29 os.remove(os.path.join(bin_dir, "linux", "gn32")) | |
30 except: | |
31 pass | |
32 | |
33 try: | |
34 os.remove(os.path.join(bin_dir, "mac", "gn")) | |
35 except: | |
36 pass | |
37 | |
38 try: | |
39 os.remove(os.path.join(bin_dir, "win", "gn.exe")) | |
40 except: | |
41 pass | |
42 | |
OLD | NEW |