summaryrefslogtreecommitdiffstats
path: root/mkinitcpio
diff options
context:
space:
mode:
Diffstat (limited to 'mkinitcpio')
-rwxr-xr-xmkinitcpio7
1 files changed, 6 insertions, 1 deletions
diff --git a/mkinitcpio b/mkinitcpio
index ec54408..4411ff3 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -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 |