diff options
author | Michael Prokop <mika@debian.org> | 2011-05-16 16:02:59 +0200 |
---|---|---|
committer | Michael Prokop <mika@debian.org> | 2011-05-16 19:11:06 +0200 |
commit | 16280bb1c09c10c527dae45b7b656224541d1342 (patch) | |
tree | 15f83d842966a867b3d8b4942b99251ae2abd3c4 /lsinitramfs | |
parent | 5f37a31d34bcf2e9548d58769d0b1eefcf2354e3 (diff) |
lsinitramfs: support xz/lzma, bzip2 and lzop as compress methods.
Closes: #586381
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Michael Prokop <mika@debian.org>
Diffstat (limited to 'lsinitramfs')
-rwxr-xr-x | lsinitramfs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lsinitramfs b/lsinitramfs index 91c65e1..f4e78c1 100755 --- a/lsinitramfs +++ b/lsinitramfs @@ -46,6 +46,15 @@ for initramfs in "$@" ; do exit 1 else echo "${initramfs}" - zcat "${initramfs}" | cpio ${cpio_args} + if zcat -t "${initramfs}" >/dev/null 2>&1 ; then + zcat "${initramfs}" | cpio ${cpio_args} + elif xzcat -t "$initramfs" >/dev/null 2>&1 ; then + xzcat "$initramfs" | cpio ${cpio_args} + elif bzip2 -t "$initramfs" >/dev/null 2>&1 ; then + bzip2 -c -d "$initramfs" | cpio ${cpio_args} + elif lzop -t "$initramfs" >/dev/null 2>&1 ; then + lzop -c -d "$initramfs" | cpio ${cpio_args} fi + + fi done |