diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-12-05 21:16:43 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2011-12-05 21:16:43 +0100 |
commit | eeb558968d02b8b46b73d0b01613271fa77a76bf (patch) | |
tree | b1c09e0a17a295110569c5ef8d2c1565dd6b4fac | |
parent | 7effc762a2de2029ccedb659f25426c80b04cf4d (diff) | |
download | mkinitcpio-eeb558968d02b8b46b73d0b01613271fa77a76bf.tar.gz mkinitcpio-eeb558968d02b8b46b73d0b01613271fa77a76bf.tar.xz |
mkinitcpio: add VERSION stamp to image
This is mostly a debugging aid. lsinitcpio will be taught to read this.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-x | mkinitcpio | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -10,6 +10,8 @@ # in case of embedded spaces, quote all path names and string comparisons # +declare -r version=%VERSION% + shopt -s extglob # Settings @@ -35,7 +37,7 @@ unset GREP_OPTIONS CDPATH usage() { cat <<EOF -mkinitcpio %VERSION% +mkinitcpio $version usage: ${0##*/} [options] Options: @@ -363,6 +365,9 @@ if [[ "${GENIMG}" ]]; then msg "Creating $COMPRESSION initcpio image: %s" "$GENIMG" [[ "$COMPRESSION" = xz ]] && COMPRESSION_OPTIONS+=" --check=crc32" + # write version stamp + printf '%s' "$version" > "$BUILDROOT/VERSION" + pushd "$BUILDROOT" >/dev/null find . -print0 | bsdcpio $( (( QUIET )) && echo '--quiet' ) -0oH newc | |