mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-12-04 14:19:04 +01:00
fix(extract): unpack .tar.lzma archives (#14298)
This commit is contained in:
1 parent
2cd4cc21fc
commit
32726ad0a5
4 files changed
+8
-2
No files matched your search
@@ -45,6 +45,7 @@ plugins=(... extract)
|
|||||||
| `tar.lrz` | Tarball with lrzip compression |
|
| `tar.lrz` | Tarball with lrzip compression |
|
||||||
| `tar.lz` | Tarball with lzip compression |
|
| `tar.lz` | Tarball with lzip compression |
|
||||||
| `tar.lz4` | Tarball with lz4 compression |
|
| `tar.lz4` | Tarball with lz4 compression |
|
||||||
|
| `tar.lzma` | Tarball with lzma compression |
|
||||||
| `tar.xz` | Tarball with lzma2 compression |
|
| `tar.xz` | Tarball with lzma2 compression |
|
||||||
| `tar.zma` | Tarball with lzma compression |
|
| `tar.zma` | Tarball with lzma compression |
|
||||||
| `tar.zst` | Tarball with zstd compression |
|
| `tar.zst` | Tarball with zstd compression |
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ local -a exts=(
|
|||||||
tar.lrz
|
tar.lrz
|
||||||
tar.lz
|
tar.lz
|
||||||
tar.lz4
|
tar.lz4
|
||||||
|
tar.lzma
|
||||||
tar.xz
|
tar.xz
|
||||||
tar.zma
|
tar.zma
|
||||||
tar.zst
|
tar.zst
|
||||||
|
|||||||
Executable → Regular
+1
-1
@@ -88,7 +88,7 @@ EOF
|
|||||||
tar --xz --help &> /dev/null \
|
tar --xz --help &> /dev/null \
|
||||||
&& tar --xz -xvf "$full_path" \
|
&& tar --xz -xvf "$full_path" \
|
||||||
|| xzcat "$full_path" | tar xvf - } ;;
|
|| xzcat "$full_path" | tar xvf - } ;;
|
||||||
(*.tar.zma|*.tlz)
|
(*.tar.lzma|*.tar.zma|*.tlz)
|
||||||
tar --lzma --help &> /dev/null \
|
tar --lzma --help &> /dev/null \
|
||||||
&& tar --lzma -xvf "$full_path" \
|
&& tar --lzma -xvf "$full_path" \
|
||||||
|| lzcat "$full_path" | tar xvf - ;;
|
|| lzcat "$full_path" | tar xvf - ;;
|
||||||
|
|||||||
@@ -167,7 +167,11 @@ check_deb_multiple() {
|
|||||||
printf '\037\235\220\150\312\260\141\363\106\001' \
|
printf '\037\235\220\150\312\260\141\363\106\001' \
|
||||||
> "$test_dir/fixture.Z"
|
> "$test_dir/fixture.Z"
|
||||||
|
|
||||||
for extension in lzma Z; do
|
cp "$test_dir/plain" "$test_dir/sample.txt"
|
||||||
|
tar -cf "$test_dir/fixture.tar" -C "$test_dir" sample.txt
|
||||||
|
lzma -c "$test_dir/fixture.tar" > "$test_dir/fixture.tar.lzma"
|
||||||
|
|
||||||
|
for extension in lzma Z tar.lzma; do
|
||||||
for mode in default target remove; do
|
for mode in default target remove; do
|
||||||
check_extract "$extension" "$mode"
|
check_extract "$extension" "$mode"
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in new issue
Block a user