Skip to content

Commit 6dc5aa9

Browse files
committed
Do not verbose the "tar tf" command
The `tar tf` command is actually just used to find the root directory. Verbosing makes the Travis log grow too big, e.g. for `openssl` recipe. Also simplify the file type detection, `endswith()` can take tuple.
1 parent 99e9664 commit 6dc5aa9

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

pythonforandroid/recipe.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -399,15 +399,10 @@ def unpack(self, arch):
399399
root_directory = fileh.filelist[0].filename.split('/')[0]
400400
if root_directory != basename(directory_name):
401401
shprint(sh.mv, root_directory, directory_name)
402-
elif (extraction_filename.endswith('.tar.gz') or
403-
extraction_filename.endswith('.tgz') or
404-
extraction_filename.endswith('.tar.bz2') or
405-
extraction_filename.endswith('.tbz2') or
406-
extraction_filename.endswith('.tar.xz') or
407-
extraction_filename.endswith('.txz')):
402+
elif extraction_filename.endswith(
403+
('.tar.gz', '.tgz', '.tar.bz2', '.tbz2', '.tar.xz', '.txz')):
408404
sh.tar('xf', extraction_filename)
409-
root_directory = shprint(
410-
sh.tar, 'tf', extraction_filename).stdout.decode(
405+
root_directory = sh.tar('tf', extraction_filename).stdout.decode(
411406
'utf-8').split('\n')[0].split('/')[0]
412407
if root_directory != directory_name:
413408
shprint(sh.mv, root_directory, directory_name)

0 commit comments

Comments
 (0)