daca2: handle xz compression
This commit is contained in:
parent
f58b4b61e2
commit
47766736fc
|
@ -19,6 +19,7 @@ import time
|
||||||
FTPSERVER = 'ftp.sunet.se'
|
FTPSERVER = 'ftp.sunet.se'
|
||||||
FTPPATH = '/pub/Linux/distributions/Debian/debian/pool/main/'
|
FTPPATH = '/pub/Linux/distributions/Debian/debian/pool/main/'
|
||||||
|
|
||||||
|
|
||||||
def getpackages(folder):
|
def getpackages(folder):
|
||||||
print('Connect')
|
print('Connect')
|
||||||
f = ftplib.FTP(FTPSERVER)
|
f = ftplib.FTP(FTPSERVER)
|
||||||
|
@ -133,6 +134,8 @@ def scanarchive(fullpath):
|
||||||
subprocess.call(['wget', fullpath])
|
subprocess.call(['wget', fullpath])
|
||||||
if filename[-3:] == '.gz':
|
if filename[-3:] == '.gz':
|
||||||
subprocess.call(['tar', 'xzvf', filename])
|
subprocess.call(['tar', 'xzvf', filename])
|
||||||
|
elif filename[-3:] == '.xz':
|
||||||
|
subprocess.call(['tar', 'xJvf', filename])
|
||||||
elif filename[-4:] == '.bz2':
|
elif filename[-4:] == '.bz2':
|
||||||
subprocess.call(['tar', 'xjvf', filename])
|
subprocess.call(['tar', 'xjvf', filename])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue