2013-05-10 19:10:56 +02:00
|
|
|
import os
|
2014-01-20 23:19:34 +01:00
|
|
|
import shutil
|
2014-01-20 23:52:41 +01:00
|
|
|
import glob
|
2013-05-10 19:10:56 +02:00
|
|
|
|
|
|
|
to_delete = [
|
|
|
|
'session_stats',
|
|
|
|
'libtorrent_logs*',
|
|
|
|
'round_trip_ms.log',
|
|
|
|
'dht.log',
|
|
|
|
'upnp.log',
|
|
|
|
'natpmp.log',
|
2013-06-17 02:45:17 +02:00
|
|
|
'bin',
|
2014-01-20 23:52:41 +01:00
|
|
|
'test_tmp_*',
|
|
|
|
'bjam_build.*.xml'
|
2013-05-10 19:10:56 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
directories = [
|
|
|
|
'examples',
|
|
|
|
'test',
|
|
|
|
'.',
|
|
|
|
'tools'
|
|
|
|
]
|
|
|
|
|
|
|
|
for d in directories:
|
|
|
|
for f in to_delete:
|
|
|
|
path = os.path.join(d, f)
|
2014-01-20 23:52:41 +01:00
|
|
|
entries = glob.glob(path)
|
|
|
|
for p in entries:
|
|
|
|
print p
|
|
|
|
try:
|
|
|
|
shutil.rmtree(p)
|
|
|
|
except:
|
|
|
|
pass
|
2013-05-10 19:10:56 +02:00
|
|
|
|