OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2013 Google Inc. All rights reserved. | 3 # Copyright (c) 2013 Google Inc. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 from optparse import OptionParser | 7 from optparse import OptionParser |
8 import glob | 8 import glob |
9 import os | 9 import os |
10 import subprocess | 10 import subprocess |
(...skipping 15 matching lines...) Expand all Loading... |
26 subprocess.call(['pgomgr', '/merge', options.pgd]) | 26 subprocess.call(['pgomgr', '/merge', options.pgd]) |
27 | 27 |
28 # *.pgc files are no longer necessary. Clear all of them. | 28 # *.pgc files are no longer necessary. Clear all of them. |
29 pgd_file = os.path.abspath(options.pgd) | 29 pgd_file = os.path.abspath(options.pgd) |
30 pgd_dir = os.path.dirname(pgd_file) | 30 pgd_dir = os.path.dirname(pgd_file) |
31 (pgd_basename, _) = os.path.splitext(os.path.basename(pgd_file)) | 31 (pgd_basename, _) = os.path.splitext(os.path.basename(pgd_file)) |
32 pgc_filepattern = os.path.join(pgd_dir, '%s!*.pgc' % pgd_basename) | 32 pgc_filepattern = os.path.join(pgd_dir, '%s!*.pgc' % pgd_basename) |
33 pgc_files= glob.glob(pgc_filepattern) | 33 pgc_files= glob.glob(pgc_filepattern) |
34 for pgc_file in pgc_files: | 34 for pgc_file in pgc_files: |
35 os.unlink(pgc_file) | 35 os.unlink(pgc_file) |
OLD | NEW |