[PATCH] Add a script for listing the contents of an updates image

Chris Lumens clumens at redhat.com
Thu Mar 13 20:54:16 UTC 2014


> Like lsinitrd but for Anaconda updates images.
> 
> Signed-off-by: Martin Kolman <mkolman at redhat.com>

A long time ago, I created ~/bin/lesspipe.sh with the following in it:

#!/bin/bash

if [ -e "$1" ]; then
   ty=$(file "$1" 2>&-)
   if [[ "$ty" =~ "XZ compressed" ]]; then
      xzcat "$1" | cpio -itv 2>&-
   elif [[ "$ty" =~ "gzip compressed" ]]; then
      gunzip -dc "$1" | cpio -itv 2>&-
   else
      LESSOPEN="|/usr/bin/lesspipe.sh %s" less $1
   fi
fi

and then set LESSOPEN="|~/bin/lesspipe.sh %s" in my environment, so I
can just look at updates images with less.

- Chris


More information about the anaconda-patches mailing list