The first part of the script only warned if the /usr/bin/lsb_release
executable is missing, but the script later failed.
This is to avoid trying to run /usr/bin/lsb_release if it does not exist.
It also changes the version check numerical comparison, so that it handles later versions, such as the comment in the script suggests.
I found that /usr/bin/lsb_release is not available in all distributions. Some docker images, even for Ubuntu, also do not include it. (For example "ubuntu:18.04" from docker hub).
(These checks could be done by reading /etc/os-release or similar files that sometimes exist even if the binary lsb_release does not, but this PR does not implement that)
The first part of the script only warned if the /usr/bin/lsb_release executable is missing, but the script later failed.
This is to avoid trying to run /usr/bin/lsb_release if it does not exist.
It also changes the version check numerical comparison, so that it handles later versions, such as the comment in the script suggests.
I found that /usr/bin/lsb_release is not available in all distributions. Some docker images, even for Ubuntu, also do not include it. (For example "ubuntu:18.04" from docker hub).
(These checks could be done by reading /etc/os-release or similar files that sometimes exist even if the binary lsb_release does not, but this PR does not implement that)