kiss: support uncompressed tar archives

This commit is contained in:
Dylan Araps 2020-05-06 00:48:11 +03:00
parent 1933a19e10
commit 1c31b264df
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 3 additions and 1 deletions

4
kiss
View File

@ -142,6 +142,7 @@ decompress() {
*.xz) xz -dcT 0 ;;
*.tgz|*.gz) gzip -d ;;
*.zst) zstd -dc ;;
*.tar) cat ;;
esac < "$1"
}
@ -394,7 +395,8 @@ pkg_extract() {
# which allows for manual extraction.
*://*.tar|*://*.tar.??|*://*.tar.???|*://*.tar.????|*://*.tgz)
decompress "$src_dir/$1/${src##*/}" |
"$tar" xf - --strip-components 1 ||
"$tar" xf - --strip-components 1 ||
die "$1" "Couldn't extract ${src##*/}"
;;