Skip to content
Browse files

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>
  • Loading branch information...
1 parent eeb5589 commit 4682aa0207c9e9a0892aa579d2fab53a9637acdc @falconindy falconindy committed Dec 5, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 lsinitcpio
View
5 lsinitcpio
@@ -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

0 comments on commit 4682aa0

Please sign in to comment.
Something went wrong with that request. Please try again.