Fix --version display
We do not have the concept of "not installed" in v2, so remove the obsolete code looking for a now non-existent variable. Also, log the version at startup. This can help when debugging from logs Change-Id: I964c4cf207c10666afc5bc7ab9f2bfb9b1897c1e
This commit is contained in:
parent
448a2602fe
commit
5adfc9365a
@ -104,11 +104,7 @@ function show_options () {
|
||||
}
|
||||
|
||||
function show_version() {
|
||||
if [ -n "$_DIB_PYTHON_INSTALL" ]; then
|
||||
python -c "from diskimage_builder import version; print(version.version_info.version_string())"
|
||||
else
|
||||
echo "diskimage-builder is not installed."
|
||||
fi
|
||||
}
|
||||
|
||||
INSTALL_PACKAGES=""
|
||||
@ -184,6 +180,8 @@ if [ "$IS_RAMDISK" == "1" ]; then
|
||||
source $_LIB/ramdisk-functions
|
||||
fi
|
||||
|
||||
echo "diskimage-builder version $(show_version)"
|
||||
|
||||
# If no elements are specified theres no way we can succeed
|
||||
if [ -z "$*" ]; then
|
||||
echo "ERROR: At least one distribution root element must be specified"
|
||||
|
Loading…
Reference in New Issue
Block a user