From 306dcbd7b21f8a680db9c795dc81a7e4276a7c9b Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 3 Feb 2013 15:00:36 -0500 Subject: 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 --- lsinitcpio | 12 ++++-------- 1 file 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: -- cgit v1.2.3-24-g4f1b