Minor fixes. Implement #45

This commit is contained in:
Krystian Bacławski 2016-08-01 19:21:07 +02:00
parent cb8c2ba33d
commit 3b4b739d7b
2 changed files with 21 additions and 12 deletions

View File

@ -276,19 +276,18 @@ def unarc(name):
continue
with open(filename, 'w') as f:
f.write(arc.read(item.filename))
elif name.endswith('.tar.gz') or name.endswith('.tar.bz2'):
with tarfile.open(name) as arc:
for item in arc.getmembers():
debug('extract "%s"' % item.name)
arc.extract(item)
elif name.endswith('.zip'):
with zipfile.ZipFile(name) as arc:
for item in arc.infolist():
debug('extract "%s"' % item.filename)
arc.extract(item)
else:
if name.endswith('.tar.gz') or name.endswith('.tar.bz2'):
module = tarfile
elif name.endswith('.zip'):
module = zipfile
else:
raise RuntimeError('Unrecognized archive: "%s"', name)
arc = module.open(name, 'r')
for item in arc:
debug('extract "%s"' % item.name)
arc.extract(item)
arc.close()
raise RuntimeError('Unrecognized archive: "%s"', name)
@fill_in_args

10
sdk/sdi.sdk Normal file
View File

@ -0,0 +1,10 @@
Short: A set of C macro/defines to make amiga development easier.
Version: 1.7
Url: git://github.com/adtools/SDI
SDI_compiler.h
SDI_hook.h
SDI_interrupt.h
SDI_lib.h
SDI_misc.h
SDI_stdarg.h