3 # Copyright (c) 2014 Intel Corporation. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
8 This script is used to remove src/third_party/speex if it is checked out from
11 Starting with Chromium M39, it has become part of the Chromium source tree
12 itself, but the change causes "gclient sync" to consider src/third_party/speex
13 a directory that can be removed and as we pass --delete_unversioned_trees and
14 --reset to "gclient sync" in fetch_deps.py, we have to do this kind of analysis
15 before running gclient:
17 * If src/third_party/speex has its own .git/, it means it is checked out from
18 its own git repository and we have to remove it before syncing so that the
19 directory is created as part of chromium-crosswalk.
20 * Otherwise, we just do not do anything and assume this has already been done.
27 SRC_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(
31 if __name__ == '__main__':
32 speex_root = os.path.join(SRC_PATH, 'third_party', 'speex')
34 if os.path.isdir(os.path.join(speex_root, '.git')):
35 print 'Removing separate "%s" git checkout.' % speex_root
36 shutil.rmtree(speex_root)