Mercurial > gub
changeset 6288:30522411dbea
Support .xz and .lzma files
author | Masamichi Hosoda <trueroad@users.noreply.github.com> |
---|---|
date | Sat, 22 Nov 2014 23:22:40 +0900 |
parents | 1c3c3f3dfecd |
children | 647380874504 |
files | gub/misc.py gub/repository.py gub/specs/tar.py gub/specs/xzutils.py |
diffstat | 4 files changed, 18 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gub/misc.py Thu Nov 20 21:30:55 2014 +0900 +++ b/gub/misc.py Sat Nov 22 23:22:40 2014 +0900 @@ -215,12 +215,18 @@ return ' -z' elif ball.endswith ('bz2'): return ' -j' + elif (ball.endswith ('xz') + or ball.endswith ('lzma') + or ball.endswith ('txz') + or ball.endswith ('tlz')): + return ' -J' return '' def unzip_command (ball): return { '-z' : 'gzip -dc', '-j' : 'bzip2 -dc', + '-J' : 'xz -dc', '': 'cat' }[compression_flag (ball).strip ()]
--- a/gub/repository.py Thu Nov 20 21:30:55 2014 +0900 +++ b/gub/repository.py Sat Nov 22 23:22:40 2014 +0900 @@ -417,7 +417,11 @@ return url and (url.endswith (rety.vc_system) or url.endswith (rety.vc_system + '.gz') or url.endswith ('.tgz') - or url.endswith (rety.vc_system + '.bz2')) + or url.endswith (rety.vc_system + '.bz2') + or url.endswith (rety.vc_system + '.xz') + or url.endswith ('.txz') + or url.endswith (rety.vc_system + '.lzma') + or url.endswith ('.tlz')) def migrate (self, dir, dir_slash_vcs): pass
--- a/gub/specs/tar.py Thu Nov 20 21:30:55 2014 +0900 +++ b/gub/specs/tar.py Sat Nov 22 23:22:40 2014 +0900 @@ -3,7 +3,7 @@ from gub import tools class Tar__tools (tools.AutoBuild): - source = 'http://ftp.gnu.org/pub/gnu/tar/tar-1.20.tar.gz' + source = 'http://ftp.gnu.org/pub/gnu/tar/tar-1.28.tar.gz' def __init__ (self, settings, source): tools.AutoBuild.__init__ (self, settings, source) if isinstance (self.source, repository.TarBall):