Bug #1166 ยป t.patch
support/getmuxlist | ||
---|---|---|
11 | 11 | |
12 | 12 |
# Get files |
13 | 13 |
if os.path.exists(tmp): |
14 |
print 'remove tmp directory' |
|
14 | 15 |
shutil.rmtree(tmp) |
15 | 16 |
os.makedirs(tmp) |
17 |
print 'created tmp directory' |
|
16 | 18 |
tbz = tmp + '/dvb-apps.tar.bz2' |
19 |
print 'downloading %s to %s' % (url, tbz) |
|
17 | 20 |
open(tbz, 'w').write(urllib2.urlopen(url).read()) |
21 |
print 'extracting to %s' % tmp |
|
18 | 22 |
tp = tarfile.open(tbz) |
19 | 23 |
tp.extractall(tmp) |
20 | 24 | |
21 | 25 |
# Copy to TVH |
22 | 26 |
if os.path.exists(out): |
27 |
print 'remove existing files' |
|
23 | 28 |
shutil.rmtree(out) |
24 | 29 |
os.makedirs(out) |
30 |
print 'creating directory %s' % out |
|
25 | 31 |
for d in glob.glob('%s/dvb-apps*/util/scan/*' % tmp): |
26 | 32 |
if os.path.isdir(d): |
33 |
print 'moving %s to %s' % (d, out) |
|
27 | 34 |
shutil.move(d, out) |
28 | 35 | |
29 | 36 |
# Cleanup |
37 |
print 'cleaning tmp' |
|
30 | 38 |
shutil.rmtree(tmp) |