diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-12-05 21:17:23 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2011-12-05 21:17:23 +0100 |
commit | 4682aa0207c9e9a0892aa579d2fab53a9637acdc (patch) | |
tree | f242c0280f1c2d916219338da9e364beaa727aa8 /lsinitcpio | |
parent | eeb558968d02b8b46b73d0b01613271fa77a76bf (diff) | |
download | mkinitcpio-4682aa0207c9e9a0892aa579d2fab53a9637acdc.tar.gz mkinitcpio-4682aa0207c9e9a0892aa579d2fab53a9637acdc.tar.xz |
lsinitcpio: read VERSION stamp out of image file
Report this version on -a if it's found.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'lsinitcpio')
-rwxr-xr-x | lsinitcpio | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -121,6 +121,8 @@ if (( analyze )); then fi done < <(decomp "$image" | bsdtar tf -) + read -r version < <(decomp "$image" | bsdtar xOf - VERSION 2>/dev/null) + # source and read config . <(decomp "$image" | bsdtar xOf - config) explicitmod=($MODULES) @@ -131,7 +133,8 @@ if (( analyze )); then # print results imagename=$image [[ -L $image ]] && imagename+=" -> $(readlink -e "$image")" - msg 'Image: %s' "$imagename" + msg 'Image: %s %s' "$imagename" + [[ $version ]] && msg 'Created with mkinitcpio %s' "$version" msg 'Kernel: %s' "${kernver:-unknown}" if [[ $compress ]]; then |