1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-11-04 14:05:41 -07:00

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

2
kiss
View File

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