52c39ec6d0
diskimage-builder deprecated the usage of which (dib-lint marks its occurrences as error by default): https://review.openstack.org/#/c/466063/ Replace all the occurences of 'which' with 'type -p'. Also, remove the (now useless) installation of which from the disable-firewalld element. Change-Id: I00bda062767070e46133cc800e82c9470923f572
21 lines
529 B
Bash
Executable File
21 lines
529 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
function _get_version_package {
|
|
if type -p pbr > /dev/null; then
|
|
local version=$(pbr info $1 | awk '{print $2}')
|
|
echo "${version}"
|
|
fi
|
|
}
|
|
|
|
cat << EOF | sudo tee "${TARGET_ROOT}/etc/sahara-extra.version"
|
|
sahara-image-elements version: $(_get_version_package "sahara-image-elements")
|
|
dib-utils version: $(_get_version_package "dib-utils")
|
|
diskimage-builder version: $(_get_version_package "diskimage-builder")
|
|
EOF
|