From 8bc2d52ca9a086d12d2044c3ef3feb4d7bedc388 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Sun, 25 Nov 2012 17:35:40 +0000 Subject: Delete libtool files also in subdirectories --- (limited to 'devbot') diff --git a/devbot/build.py b/devbot/build.py index de9e59a..65a7ea3 100644 --- a/devbot/build.py +++ b/devbot/build.py @@ -1,7 +1,7 @@ #!/usr/bin/python -u from distutils import sysconfig -import glob +import fnmatch import json import os import multiprocessing @@ -49,13 +49,11 @@ def get_module_commit_id(module): return commit_id.strip() def unlink_libtool_files(): - orig_cwd = os.getcwd() - os.chdir(config.lib_dir) - - for filename in glob.glob("*.la"): - os.unlink(filename) + def func(arg, dirname, fnames): + for fname in fnmatch.filter(fnames, "*.la"): + os.unlink(os.path.join(dirname, fname)) - os.chdir(orig_cwd) + os.path.walk(config.lib_dir, func, None) def pull_source(module): module_dir = module.get_source_dir() -- cgit v0.9.1