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 clang_format binaries from | |
6 # third_party/clang_format/bin* now that the binaries have been moved to | |
7 # src/buildtools. Keeping the old ones around will be pretty confusing since | |
8 # the version will be out-of-date. | |
9 # | |
10 # This script assumes it is located in third_party/clang_format/bin and locates | |
11 # the binaries relative to itself. | |
12 # | |
13 # TODO(jochen) remove this script when people have likely been updated. | |
14 # End of July 2014 would be good. | |
15 | |
16 import os | |
17 import sys | |
18 | |
19 bin_dir = os.path.dirname(__file__) | |
20 | |
21 # Typically only one platform will have binaries. Remove them all just in case, | |
22 # but ignore all errors. | |
23 | |
24 try: | |
25 os.remove(os.path.join(bin_dir, "linux", "clang-format")) | |
26 except: | |
27 pass | |
28 | |
29 try: | |
30 os.remove(os.path.join(bin_dir, "mac", "clang-format")) | |
31 except: | |
32 pass | |
33 | |
34 try: | |
35 os.remove(os.path.join(bin_dir, "win", "clang-format.exe")) | |
36 except: | |
37 pass | |
38 | |
OLD | NEW |