From 64cdd8125334400502b539098f2f657e5c467416 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Mon, 20 Nov 2023 13:48:00 -0500 Subject: [PATCH] releng/docker/build-init.sh: update ZBM version when possible --- releng/docker/build-init.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/releng/docker/build-init.sh b/releng/docker/build-init.sh index 5ab1caa58..09e1a1bb6 100755 --- a/releng/docker/build-init.sh +++ b/releng/docker/build-init.sh @@ -38,6 +38,9 @@ Usage: $0 [options] Specify specific tag or commit hash to fetch (Ignored if /zbm already contains a ZFSBootMenu tree) + -V + Do not attempt to update the version recorded in the source tree + -e Specify a yq-go statement that will be evaluated as @@ -54,7 +57,10 @@ EOF PACKAGES=() CONFIGEVALS=() GENARGS=() -while getopts "hb:o:t:e:p:" opt; do + +SKIP_VERSIONING= + +while getopts "hb:o:t:e:p:V" opt; do case "${opt}" in b) BUILDROOT="${OPTARG}" @@ -71,6 +77,9 @@ while getopts "hb:o:t:e:p:" opt; do e) CONFIGEVALS+=( "${OPTARG}" ) ;; + V) + SKIP_VERSIONING="yes" + ;; h) usage exit 0 @@ -228,4 +237,9 @@ for ceval in "${CONFIGEVALS[@]}"; do || error "failed to apply '${ceval}' to config" done +# If possible, update the version recorded in the ZFSBootMenu repository +if [ "${SKIP_VERSIONING,,}" != "yes" ] && [ -x /zbm/releng/version.sh ]; then + ( cd /zbm && ./releng/version.sh -u ) || true +fi + exec /zbm/bin/generate-zbm "${GENARGS[@]}"