Skip to content

Commit

Permalink
* ok make it work on linux too :)
Browse files Browse the repository at this point in the history
  • Loading branch information
examachine committed Mar 1, 2017
1 parent 0de9e35 commit b144314
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions pisi/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,8 @@ def unpack_dir(self, target_dir):
rmode = 'r:bz2'
elif self.type == 'tarlzma':
rmode = 'r:'
if util.is_osx():
ret, out, err = util.run_batch("lzma -d -f " + self.file_path)
ret, out, err = util.run_batch("lzma -d -f " + self.file_path)

else:
ret, out, err = util.run_batch("lzma d %s %s" %
(self.file_path +
ctx.const.lzma_suffix,
self.file_path))
if ret != 0:
raise LZMAError(err)
self.file_path = self.file_path.rstrip(ctx.const.lzma_suffix)
Expand Down Expand Up @@ -158,10 +152,7 @@ def close(self):

if self.tar.mode == 'w' and self.type == 'tarlzma':
batch = None
if util.is_osx():
lzma = "lzma -z"
else:
lzma = "lzmash"
lzma = "lzma -z"
if ctx.config.values.build.compressionlevel:
lzma += " -%d" % ctx.config.values.build.compressionlevel
ret, out, err = util.run_batch("%s %s" % (lzma, self.file_path))
Expand Down

0 comments on commit b144314

Please sign in to comment.