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