summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-02-03 21:00:36 +0100
committerDave Reisner <dreisner@archlinux.org>2013-03-09 19:03:12 +0100
commit306dcbd7b21f8a680db9c795dc81a7e4276a7c9b (patch)
treeed20b1d7b41089f36a0da19a11ea626eb4da9976
parent535b38fb68a92f53d65344271bb74bc0cce64962 (diff)
downloadmkinitcpio-306dcbd7b21f8a680db9c795dc81a7e4276a7c9b.tar.gz
mkinitcpio-306dcbd7b21f8a680db9c795dc81a7e4276a7c9b.tar.xz
lsinitcpio: shortcut lzop involvement to bsdtar
libarchive 3.1 supports LZO now, so we no longer need this indirection everywhere. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-xlsinitcpio12
1 files changed, 4 insertions, 8 deletions
diff --git a/lsinitcpio b/lsinitcpio
index 0a60399..e431e72 100755
--- a/lsinitcpio
+++ b/lsinitcpio
@@ -135,12 +135,8 @@ analyze_image() {
ratio=.$(( zsize * 1000 / fullsize % 1000 ))
fi
- # decompress the image since we need to read from it multiple times. we
- # have to pass this through decomp() since the image might be lzop which
- # bsdtar can't read.
- if ! decomp "$_image" | bsdtar -C "$workdir" -xf -; then
- die 'Failed to decompress image'
- fi
+ # decompress the image since we need to read from it multiple times.
+ bsdtar -C "$workdir" -xf "$_image" || die 'Failed to decompress image'
# collect stats
kernver=("$workdir"/usr/lib/modules/*/)
@@ -278,10 +274,10 @@ _compress=$(detect_filetype "$_image") || exit
if (( _optanalyze )); then
analyze_image "$_image"
elif (( _optshowconfig )); then
- decomp "$_image" | bsdtar xOf - buildconfig 2>/dev/null ||
+ bsdtar xOf "$_image" buildconfig 2>/dev/null ||
die 'Failed to extract config from image (mkinitcpio too old?)'
else
- decomp "$_image" | bsdcpio -i --quiet $_optverbose $_list
+ bsdcpio -i --quiet $_optverbose $_list <"$_image"
fi
# vim: set ft=sh ts=4 sw=4 et: