Skip to content

Commit

Permalink
releng/docker/build-init.sh: update ZBM version when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
ahesford committed Nov 20, 2023
1 parent eea90ec commit 64cdd81
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion releng/docker/build-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <statement>
Specify a yq-go statement that will be evaluated as
Expand All @@ -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}"
Expand All @@ -71,6 +77,9 @@ while getopts "hb:o:t:e:p:" opt; do
e)
CONFIGEVALS+=( "${OPTARG}" )
;;
V)
SKIP_VERSIONING="yes"
;;
h)
usage
exit 0
Expand Down Expand Up @@ -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[@]}"

0 comments on commit 64cdd81

Please sign in to comment.