2014-01-26 18:31:06 +01:00
|
|
|
import os
|
|
|
|
import shutil
|
|
|
|
import glob
|
|
|
|
|
|
|
|
def clean():
|
|
|
|
to_delete = [
|
|
|
|
'session_stats',
|
|
|
|
'libtorrent_logs*',
|
|
|
|
'round_trip_ms.log',
|
|
|
|
'dht.log',
|
|
|
|
'upnp.log',
|
|
|
|
'natpmp.log',
|
|
|
|
'bin',
|
|
|
|
'test_tmp_*',
|
|
|
|
'bjam_build.*.xml'
|
2014-03-27 07:22:12 +01:00
|
|
|
'*.exe',
|
|
|
|
'*.pdb',
|
|
|
|
'*.pyd'
|
2014-01-26 18:31:06 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
directories = [
|
|
|
|
'examples',
|
|
|
|
'test',
|
|
|
|
'.',
|
2014-03-27 07:22:12 +01:00
|
|
|
'tools',
|
|
|
|
os.path.join('bindings', 'python')
|
2014-01-26 18:31:06 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
for d in directories:
|
|
|
|
for f in to_delete:
|
|
|
|
path = os.path.join(d, f)
|
|
|
|
entries = glob.glob(path)
|
|
|
|
for p in entries:
|
|
|
|
print p
|
|
|
|
try:
|
|
|
|
shutil.rmtree(p)
|
|
|
|
except:
|
|
|
|
pass
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
clean()
|
|
|
|
|