Handle more tar files in root folder detection

Fixes #1548.
This commit is contained in:
Fredrik Fornwall 2017-09-20 21:27:36 +02:00
parent 216e07bfe0
commit 7dd5d6d72d

View File

@ -475,7 +475,7 @@ termux_step_extract_package() {
rm -Rf $folder
unzip -q "$file"
else
folder=`tar tf "$file" | head -1 | sed -e 's/\/.*//'`
folder=`tar tf "$file" | head -1 | sed 's/^.\///' | sed -e 's/\/.*//'`
rm -Rf $folder
tar xf "$file"
fi